Mercurial > hg > openmind
comparison src/main/java/cl/maps/duplex/IDuplexMap.java @ 59:6e08ff123ae6
check in complete source of cl.maps.
| author | casties |
|---|---|
| date | Wed, 14 Dec 2016 15:49:40 +0100 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 58:153a0232270b | 59:6e08ff123ae6 |
|---|---|
| 1 package cl.maps.duplex; | |
| 2 | |
| 3 import java.util.Collection; | |
| 4 import java.util.Map; | |
| 5 import java.util.Set; | |
| 6 | |
| 7 import cl.maps.quad.QuadKey; | |
| 8 | |
| 9 public interface IDuplexMap<V, A, B> { | |
| 10 | |
| 11 int size(); | |
| 12 | |
| 13 boolean isEmpty(); | |
| 14 | |
| 15 boolean containsKey(DuplexKey<A, B> key); | |
| 16 | |
| 17 boolean containsValue(Object value); | |
| 18 | |
| 19 V get(DuplexKey<A, B> key); | |
| 20 | |
| 21 V put(DuplexKey<A, B> key, V value); | |
| 22 | |
| 23 V remove(DuplexKey<A, B> key); | |
| 24 | |
| 25 //void putAll(Map<? extends K, ? extends V> m); | |
| 26 | |
| 27 void clear(); | |
| 28 | |
| 29 Set<DuplexKey<A, B>> keySet(); | |
| 30 | |
| 31 Collection<V> values(); | |
| 32 | |
| 33 Set<Map.Entry<DuplexKey<A, B>, V>> entrySet(); | |
| 34 | |
| 35 boolean equals(Object o); | |
| 36 | |
| 37 /** | |
| 38 * Returns the hash code value for this map. The hash code of a map is | |
| 39 * defined to be the sum of the hash codes of each entry in the map's | |
| 40 * <tt>entrySet()</tt> view. This ensures that <tt>m1.equals(m2)</tt> | |
| 41 * implies that <tt>m1.hashCode()==m2.hashCode()</tt> for any two maps | |
| 42 * <tt>m1</tt> and <tt>m2</tt>, as required by the general contract of | |
| 43 * {@link Object#hashCode}. | |
| 44 * | |
| 45 * @return the hash code value for this map | |
| 46 * @see Map.Entry#hashCode() | |
| 47 * @see Object#equals(Object) | |
| 48 * @see #equals(Object) | |
| 49 */ | |
| 50 int hashCode(); | |
| 51 | |
| 52 } |
