org.apache.jackrabbit.mk.model
Class AbstractPropertyState

java.lang.Object
  extended by org.apache.jackrabbit.mk.model.AbstractPropertyState
All Implemented Interfaces:
PropertyState

public abstract class AbstractPropertyState
extends Object
implements PropertyState

Abstract base class for PropertyState implementations. This base class contains default implementations of the equals(Object) and hashCode() methods based on the implemented interface.


Constructor Summary
AbstractPropertyState()
           
 
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.
 
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.PropertyState
getEncodedValue, getName
 

Constructor Detail

AbstractPropertyState

public AbstractPropertyState()
Method Detail

equals

public boolean equals(Object that)
Checks whether the given object is equal to this one. Two property states are considered equal if both their names and encoded values 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 property name since PropertyState 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.