public abstract class AbstractNodeState extends Object implements NodeState
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 and Description |
|---|
AbstractNodeState() |
| Modifier and Type | Method and Description |
|---|---|
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 the hash code.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetChildNodeEntries, getPropertiespublic 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 returnnull if not foundpublic long getPropertyCount()
NodeStategetPropertyCount 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 returnnull if not foundpublic long getChildNodeCount()
NodeStategetChildNodeCount in interface NodeStatepublic boolean equals(Object that)
Copyright © 2012-2013 The Apache Software Foundation. All Rights Reserved.