org.apache.jackrabbit.mk.model.tree
Class AbstractChildNode
java.lang.Object
org.apache.jackrabbit.mk.model.tree.AbstractChildNode
- All Implemented Interfaces:
- ChildNode
public abstract class AbstractChildNode
- extends Object
- implements ChildNode
Abstract base class for ChildNode implementations.
This base class contains default implementations of the
equals(Object) and hashCode() methods based on
the implemented interface.
|
Method Summary |
boolean |
equals(Object that)
Checks whether the given object is equal to this one. |
int |
hashCode()
Returns a hash code that's compatible with how the
equals(Object) method is implemented. |
AbstractChildNode
public AbstractChildNode()
equals
public boolean equals(Object that)
- Checks whether the given object is equal to this one. Two child node
entries are considered equal if both their names and referenced node
states match. Subclasses may override this method with a more efficient
equality check if one is available.
- Overrides:
equals in class Object
- Parameters:
that - target of the comparison
- Returns:
true if the objects are equal,
false otherwise
hashCode
public int hashCode()
- Returns a hash code that's compatible with how the
equals(Object) method is implemented. The current
implementation simply returns the hash code of the child node name
since ChildNode instances are not intended for use as
hash keys.
- Overrides:
hashCode in class Object
- Returns:
- hash code
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.