K - the type of the first keyV - the type of the second keypublic final class BiMap<K,V> extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
removes all entries from the map.
|
boolean |
containsKey(K k)
Checks if the map contains the key.
|
boolean |
containsValue(V v)
Checks if the map contains the value.
|
V |
getByKey(K value)
Gets the value by key.
|
K |
getByValue(V key)
Gets the key by value.
|
boolean |
isEmpty()
Checks if the map is empty.
|
void |
put(K k,
V v)
Puts the entry into the map.
|
void |
removeByKey(K k)
Removes the entry by key.
|
void |
removeByValue(V v)
Removes the entry by value.
|
int |
size()
Gets the size of the map.
|
public BiMap()
BiMap instance.public void put(K k, V v)
k - the keyv - the valuepublic V getByKey(K value)
value - the keypublic K getByValue(V key)
key - the valuepublic void removeByKey(K k)
k - the keypublic void removeByValue(V v)
v - the valuepublic int size()
public void clear()
public boolean isEmpty()
public boolean containsKey(K k)
k - the keypublic boolean containsValue(V v)
v - the valueCopyright © 1998–2023 Apryse Group NV. All rights reserved.