Class MapKeyElementSelector

java.lang.Object
de.danielbechler.diff.selector.ElementSelector
de.danielbechler.diff.selector.MapKeyElementSelector

public final class MapKeyElementSelector extends ElementSelector
  • Constructor Details

    • MapKeyElementSelector

      public MapKeyElementSelector(Object key)
  • Method Details

    • getKey

      @Deprecated public Object getKey()
      Deprecated.
      Low-level API. Don't use in production code. May be removed in future versions.
    • toHumanReadableString

      public String toHumanReadableString()
      Specified by:
      toHumanReadableString in class ElementSelector
    • equals

      public boolean equals(Object o)
      Description copied from class: ElementSelector
      Must be implemented in a way so that this element can be distinguished from the other ones.
      Specified by:
      equals in class ElementSelector
      Parameters:
      o - The object to check equality against.
      Returns:
      true is the given object equals this one, otherwise false.
    • hashCode

      public int hashCode()
      Description copied from class: ElementSelector
      Make sure to implement this properly. If two elements are equal, their hash code must be equal as well. However, it is absolutely okay if two unequal elements return the same hash code. A simple implementation could just return 0.
      Specified by:
      hashCode in class ElementSelector
      Returns:
      The hash code of this element.