Package org.openstreetmap.josm.data.osm
Class Storage.PrimitiveIdHash
java.lang.Object
org.openstreetmap.josm.data.osm.Storage.PrimitiveIdHash
- All Implemented Interfaces:
Hash<PrimitiveId,PrimitiveId>
Hash for
PrimitiveId.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(PrimitiveId key, PrimitiveId value) Compare two instances for semantic or lookup equality.intGet hashcode for given instance, based on some inner state of the instance.
-
Constructor Details
-
PrimitiveIdHash
public PrimitiveIdHash()
-
-
Method Details
-
getHashCode
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<PrimitiveId,PrimitiveId> - Parameters:
k- the object to compute hashcode for- Returns:
- computed hashcode
-
equals
Description copied from interface:HashCompare two instances for semantic or lookup equality. For use cases where it compares different types, refer toStorage.- Specified by:
equalsin interfaceHash<PrimitiveId,PrimitiveId> - Parameters:
key- the object to comparevalue- the object to compare- Returns:
- true if the objects are semantically equivalent, or if k uniquely identifies t in given class.
-