Package org.apache.juneau.internal
Class BiMap<K,V>
java.lang.Object
org.apache.juneau.internal.BiMap<K,V>
- Type Parameters:
K- The key type.V- The value type.
- All Implemented Interfaces:
Map<K,V>
A linked hashmap with reverse key lookup by value.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) static <K,V> BiMap.Builder<K, V> create()Create a new builder for this class.entrySet()Gets the key that is currently mapped to the specified value.booleanisEmpty()keySet()voidintsize()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
BiMap
Constructor.- Parameters:
builder- The builder for this object.
-
-
Method Details
-
create
Create a new builder for this class.- Type Parameters:
K- The key type.V- The value type.- Returns:
- A new builder.
-
getKey
Gets the key that is currently mapped to the specified value.- Parameters:
value- The value to return.- Returns:
- The key matching the value.
-
size
-
isEmpty
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
put
-
remove
-
putAll
-
clear
-
keySet
-
values
-
entrySet
-