Package org.cip4.jdflib.util
Class BiHashMap<a,b>
java.lang.Object
org.cip4.jdflib.util.BiHashMap<a,b>
- Type Parameters:
a- any datatype for the keyb- any datatype for the value
- All Implemented Interfaces:
Map<a,b>
Bidirectional HashMap utility class
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()get the value for keybooleancontainsKey(Object arg0) booleancontainsValue(Object arg0) entrySet()get the value for keyget a reference to the internal key mapget a reference to the internal value mapget the value for keybooleanisEmpty()keySet()put the value for key
both key and value must be non-nullvoidremove key and its associated valueremove value and its associated keyvoidsetUnique(boolean b) TODO Please insert comment!intsize()toString()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
BiHashMap
public BiHashMap()
-
-
Method Details
-
getValue
get the value for key- Parameters:
key- the key- Returns:
- the corresponding value
-
getKeyIterator
- Returns:
- the corresponding key iterator
-
getKey
get the value for key- Parameters:
val- the value- Returns:
- the corresponding key
-
remove
remove key and its associated value -
removeVal
remove value and its associated key- Parameters:
value- the value- Returns:
-
put
put the value for key
both key and value must be non-null -
clear
public void clear()get the value for key -
getKeyMap
get a reference to the internal key map- Returns:
-
getValMap
get a reference to the internal value map- Returns:
-
toString
-
containsKey
- Specified by:
containsKeyin interfaceMap<a,b> - Parameters:
arg0-- Returns:
- See Also:
-
containsValue
- Specified by:
containsValuein interfaceMap<a,b> - Parameters:
arg0-- Returns:
- See Also:
-
entrySet
-
get
-
isEmpty
public boolean isEmpty() -
keySet
-
putAll
-
size
public int size() -
values
-
setUnique
public void setUnique(boolean b) TODO Please insert comment!- Parameters:
b-
-