Class DuplicateNode.NodeHash
- java.lang.Object
-
- org.openstreetmap.josm.data.validation.tests.DuplicateNode.NodeHash
-
- All Implemented Interfaces:
Hash<java.lang.Object,java.lang.Object>
- Enclosing class:
- DuplicateNode
protected static class DuplicateNode.NodeHash extends java.lang.Object implements Hash<java.lang.Object,java.lang.Object>
-
-
Field Summary
Fields Modifier and Type Field Description private doubleprecision
-
Constructor Summary
Constructors Modifier Constructor Description protectedNodeHash()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object k, java.lang.Object t)Compare two instances for semantic or lookup equality.intgetHashCode(java.lang.Object k)Get hashcode for given instance, based on some inner state of the instance.protected LatLongetLatLon(java.lang.Object o)private LatLonroundCoord(LatLon coor)Returns the rounded coordinated according toprecision
-
-
-
Field Detail
-
precision
private final double precision
-
-
Constructor Detail
-
NodeHash
protected NodeHash()
-
-
Method Detail
-
roundCoord
private LatLon roundCoord(LatLon coor)
Returns the rounded coordinated according toprecision- See Also:
LatLon.roundToOsmPrecision(double)
-
equals
public boolean equals(java.lang.Object k, java.lang.Object t)
Description copied from interface:HashCompare two instances for semantic or lookup equality. For use cases where it compares different types, refer toStorage.
-
getHashCode
public int getHashCode(java.lang.Object k)
Description copied from interface:HashGet 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:
getHashCodein interfaceHash<java.lang.Object,java.lang.Object>- Parameters:
k- the object to compute hashcode for- Returns:
- computed hashcode
-
-