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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(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.boolean
isEmpty()
keySet()
void
int
size()
values()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
get
-
put
-
remove
-
putAll
-
clear
-
keySet
-
values
-
entrySet
-