org.openstreetmap.josm.data.validation.tests
Class DuplicateNode.NodeHash

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

private static class DuplicateNode.NodeHash
extends java.lang.Object
implements Hash<java.lang.Object,java.lang.Object>


Field Summary
(package private)  double precision
           
 
Constructor Summary
private DuplicateNode.NodeHash()
           
 
Method Summary
 boolean equals(java.lang.Object k, java.lang.Object t)
          Compare two instances for semantic or lookup equality.
 int getHashCode(java.lang.Object k)
          Get hashcode for given instance, based on some inner state of the instance.
private  LatLon getLatLon(java.lang.Object o)
           
private  LatLon roundCoord(LatLon coor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

precision

double precision
Constructor Detail

DuplicateNode.NodeHash

private DuplicateNode.NodeHash()
Method Detail

roundCoord

private LatLon roundCoord(LatLon coor)

getLatLon

private LatLon getLatLon(java.lang.Object o)

equals

public boolean equals(java.lang.Object k,
                      java.lang.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<java.lang.Object,java.lang.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(java.lang.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<java.lang.Object,java.lang.Object>
Parameters:
k - the object to compute hashcode for
Returns:
computed hashcode


JOSM