BiMap backed by two hash tables. This implementation allows null keys and values. A
HashBiMap and its inverse are both serializable.
This implementation guarantees insertion-based iteration order of its keys.
See the Guava User Guide article on BiMap .
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| private class | |
| private static class | |
| private abstract class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private transient HashBiMap. | |
| private transient @Nullable HashBiMap. | |
| private transient @Nullable HashBiMap. | |
| private transient BiMap | |
| private transient HashBiMap. | |
| private static final double | |
| private transient int | |
| private transient int | |
| private static final long | |
| private transient int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Overrides com. Implements java. |
| public boolean | containsKey(Object
key whose presence in this map is to be tested key)Overrides java. Implements java. true if this map contains a mapping for the specified
key.
|
| public boolean | Returns: true if a mapping exists from a key to the specified valuethe object to search for in the values of this BiMap value)Overrides java. Implements java. true if this BiMap contains an entry whose value is equal to value (or,
equivalently, if this inverse view contains a key that is equal to value).
|
| public static <K extends @Nullable Object, V extends @Nullable Object> HashBiMap | |
| public static <K extends @Nullable Object, V extends @Nullable Object> HashBiMap | create(int
the expected number of entries expectedSize)Constructs a new, empty bimap with the specified expected size. |
| public static <K extends @Nullable Object, V extends @Nullable Object> HashBiMap | |
| private @Nullable HashBiMap. | |
| private void | |
| pack-priv Iterator | entryIterator()
Implements abstract com. |
| public V | forcePut(K
the key with which the specified value is to be associated key, V the value to be associated with the specified key value)Implements com. put that silently removes any existing entry with the value value before proceeding with the put operation.
|
| public void | forEach(BiConsumer<? super K, ? super V>
The action to be performed for each entry action)Overrides default java. |
| public V | get(Object
the key whose associated value is to be returned key)Overrides java. Implements java. null if this map contains no mapping for the key.
|
| private void | |
| private void | |
| public BiMap | inverse()
Implements com. |
| public Set | keySet()
Overrides java. Implements java. Set view of the keys contained in this map.
|
| public V | put(K
key with which the specified value is to be associated key, V value to be associated with the specified key value)Overrides java. Implements com. |
| private V | |
| private K | |
| private void | |
| private void | |
| public V | remove(Object
key whose mapping is to be removed from the map key)Overrides java. Implements java. |
| public void | replaceAll(BiFunction<? super K, ? super V, ? extends V>
the function to apply to each entry function)Overrides default java. |
| private HashBiMap. | |
| private HashBiMap. | |
| public int | size()
Implements abstract com. Implements java. |
| public Set | values()
Overrides java. Implements com. Collection view of the values contained in this map.
|
| private void |