| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.equanda.util.collection.OneToOneHashMap<K,V>
public class OneToOneHashMap<K,V>
This class provides a mapping between keys and values, but unlike a regular java.util.Map there are two specificities:
| Constructor Summary | |
|---|---|
OneToOneHashMap()
 | 
|
| Method Summary | |
|---|---|
 K | 
getKeyForValue(V value)
Gets the key that is associated with the given value.  | 
 V | 
getValueForKey(K key)
Gets the value that is associated with the given key.  | 
 V | 
put(K key,
    V value)
Associates the specified value with the specified key.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public OneToOneHashMap()
| Method Detail | 
|---|
public V put(K key,
             V value)
key - keyvalue - value
IllegalArgumentException - if there is a previous mapping for the key or the value
NullPointerException - if the key or the value is nullpublic V getValueForKey(K key)
key - key
NullPointerException - if the key is nullpublic K getKeyForValue(V value)
value - value
NullPointerException - if the value is null
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||