|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.mk.model.tree.AbstractNodeState
public abstract class AbstractNodeState
Abstract base class for NodeState implementations.
This base class contains default implementations of the
equals(Object) and hashCode() methods based on
the implemented interface.
This class also implements trivial (and potentially very slow) versions of
the getProperty(String) and getPropertyCount() methods
based on NodeState.getProperties(). The getChildNode(String) and
getChildNodeCount() methods are similarly implemented based on
NodeState.getChildNodeEntries(long, int). Subclasses should normally
override these method with a more efficient alternatives.
| Constructor Summary | |
|---|---|
AbstractNodeState()
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object that)
Checks whether the given object is equal to this one. |
NodeState |
getChildNode(String name)
Returns the named child node. |
long |
getChildNodeCount()
Returns the number of child nodes of this node. |
PropertyState |
getProperty(String name)
Returns the named property. |
long |
getPropertyCount()
Returns the number of properties of this node. |
int |
hashCode()
Returns a hash code that's compatible with how the equals(Object) method is implemented. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.jackrabbit.mk.model.tree.NodeState |
|---|
getChildNodeEntries, getProperties |
| Constructor Detail |
|---|
public AbstractNodeState()
| Method Detail |
|---|
public PropertyState getProperty(String name)
NodeState
The namespace of properties and child nodes is shared, so if
this method returns a non-null value for a given
name, then NodeState.getChildNode(String) is guaranteed to return
null for the same name.
getProperty in interface NodeStatename - name of the property to return
null if not foundpublic long getPropertyCount()
NodeState
getPropertyCount in interface NodeStatepublic NodeState getChildNode(String name)
NodeState
The namespace of properties and child nodes is shared, so if
this method returns a non-null value for a given
name, then NodeState.getProperty(String) is guaranteed to return
null for the same name.
getChildNode in interface NodeStatename - name of the child node to return
null if not foundpublic long getChildNodeCount()
NodeState
getChildNodeCount in interface NodeStatepublic boolean equals(Object that)
equals in class Objectthat - target of the comparison
true if the objects are equal,
false otherwisepublic int hashCode()
equals(Object) method is implemented. The current
implementation simply returns zero for everything since
NodeState instances are not intended for use as hash keys.
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||