Class DuplicateNode.NodeHash

java.lang.Object
org.openstreetmap.josm.data.validation.tests.DuplicateNode.NodeHash
All Implemented Interfaces:
Hash<Object,Object>
Enclosing class:
DuplicateNode

protected static class DuplicateNode.NodeHash extends Object implements Hash<Object,Object>
  • Field Details

  • Constructor Details

  • Method Details

    • roundCoord

      private LatLon roundCoord(LatLon coor)
      Returns the rounded coordinated according to precision
      See Also:
    • getLatLon

      protected LatLon getLatLon(Object o)
    • equals

      public boolean equals(Object k, Object t)
      Description copied from interface: Hash
      Compare two instances for semantic or lookup equality. For use cases where it compares different types, refer to Storage.
      Specified by:
      equals in interface Hash<Object,Object>
      Parameters:
      k - the object to compare
      t - the object to compare
      Returns:
      true if the objects are semantically equivalent, or if k uniquely identifies t in given class.
    • getHashCode

      public int getHashCode(Object k)
      Description copied from interface: Hash
      Get hashcode for given instance, based on some inner state of the instance. The returned hashcode should remain constant over the time, so it should be based on some instance invariant.
      Specified by:
      getHashCode in interface Hash<Object,Object>
      Parameters:
      k - the object to compute hashcode for
      Returns:
      computed hashcode