Class AbstractPropertyState

  • All Implemented Interfaces:
    org.apache.jackrabbit.oak.api.PropertyState
    Direct Known Subclasses:
    EmptyPropertyState

    public abstract class AbstractPropertyState
    extends java.lang.Object
    implements org.apache.jackrabbit.oak.api.PropertyState
    Abstract base class for PropertyState implementations. This class provides default implementations of basic Object methods, for consistency across all property states.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean equal​(org.apache.jackrabbit.oak.api.PropertyState a, org.apache.jackrabbit.oak.api.PropertyState b)
      Checks whether the given two property states are equal.
      boolean equals​(java.lang.Object other)
      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.
      static int hashCode​(org.apache.jackrabbit.oak.api.PropertyState property)  
      java.lang.String toString()  
      static java.lang.String toString​(org.apache.jackrabbit.oak.api.PropertyState property)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.apache.jackrabbit.oak.api.PropertyState

        count, getName, getType, getValue, getValue, isArray, size, size
    • Constructor Detail

      • AbstractPropertyState

        public AbstractPropertyState()
    • Method Detail

      • equal

        public static boolean equal​(org.apache.jackrabbit.oak.api.PropertyState a,
                                    org.apache.jackrabbit.oak.api.PropertyState b)
        Checks whether the given two property states are equal. They are considered equal if their names and types match, they have an equal number of values, and each of the values is equal with the corresponding value in the other property.
        Parameters:
        a - first property state
        b - second property state
        Returns:
        true if the properties are equal, false otherwise
      • hashCode

        public static int hashCode​(org.apache.jackrabbit.oak.api.PropertyState property)
      • toString

        public static java.lang.String toString​(org.apache.jackrabbit.oak.api.PropertyState property)
      • equals

        public boolean equals​(java.lang.Object other)
        Checks whether the given object is equal to this one. See the equal(PropertyState, PropertyState) method for the definition of property state equality. Subclasses may override this method with a more efficient equality check if one is available.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        other - 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 java.lang.Object
        Returns:
        hash code
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object