Changeset 2512 in josm for trunk/src/org/openstreetmap/josm/data/osm/Hash.java
- Timestamp:
- 2009-11-24T10:45:04+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Hash.java
r2399 r2512 1 1 /* 2 2 * JOSMng - a Java Open Street Map editor, the next generation. 3 * 3 * 4 4 * Copyright (C) 2008 Petr Nejedly <P.Nejedly@sh.cvut.cz> 5 5 * … … 26 26 * It supports two type parameters to implement effective foreign key implementation 27 27 * inside (@link Storage}, but for basic use, both type parameters are the same. 28 * 28 * 29 29 * For use cases, see {@link Storage}. 30 30 * @author nenik 31 31 */ 32 32 public interface Hash<K,T> { 33 33 34 34 /** 35 35 * Get hashcode for given instance, based on some inner state of the 36 36 * instance. The returned hashcode should remain constant over the time, 37 37 * so it should be based on some instance invariant. 38 * 38 * 39 39 * @param k the object to compute hashcode for 40 40 * @return computed hashcode 41 41 */ 42 42 public int getHashCode(K k); 43 43 44 44 /** 45 45 * Compare two instances for semantic or lookup equality. For use cases 46 46 * where it compares different types, refer to {@link Storage}. 47 * 47 * 48 48 * @param k the object to compare 49 49 * @param t the object to compare
Note:
See TracChangeset
for help on using the changeset viewer.