Class AbstractChildNodeEntry
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.state.AbstractChildNodeEntry
-
- All Implemented Interfaces:
ChildNodeEntry
- Direct Known Subclasses:
MemoryChildNodeEntry
public abstract class AbstractChildNodeEntry extends java.lang.Object implements ChildNodeEntry
Abstract base class forChildNodeEntryimplementations. This base class contains default implementations of theequals(Object)andhashCode()methods based on the implemented interface.
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.oak.spi.state.ChildNodeEntry
GET_NAME
-
-
Constructor Summary
Constructors Constructor Description AbstractChildNodeEntry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object that)Checks whether the given object is equal to this one.inthashCode()Returns a hash code that's compatible with how theequals(Object)method is implemented.java.lang.StringtoString()Returns a string representation of this child node entry.-
Methods inherited from interface org.apache.jackrabbit.oak.spi.state.ChildNodeEntry
getName, getNodeState
-
-
-
-
Method Detail
-
toString
public java.lang.String toString()
Returns a string representation of this child node entry.- Overrides:
toStringin classjava.lang.Object- Returns:
- string representation
-
equals
public boolean equals(java.lang.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:
equalsin classjava.lang.Object- Parameters:
that- target of the comparison- Returns:
trueif the objects are equal,falseotherwise
-
hashCode
public int hashCode()
Returns a hash code that's compatible with how theequals(Object)method is implemented. The current implementation simply returns the hash code of the child node name sinceChildNodeEntryinstances are not intended for use as hash keys.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hash code
-
-