Example usage for Java com.google.common.collect BiMap fields, constructors, methods, implement or subclass
The text is from its open source code.
void | clear() Removes all of the mappings from this map (optional operation). |
V | computeIfAbsent(K key, Function super K, ? extends V> mappingFunction) If the specified key is not already associated with a value (or is mapped to null ), attempts to compute its value using the given mapping function and enters it into this map unless null . |
boolean | containsKey(Object key) Returns true if this map contains a mapping for the specified key. |
boolean | containsValue(Object value) Returns true if this map maps one or more keys to the specified value. |
Set | entrySet() Returns a Set view of the mappings contained in this map. |
boolean | equals(Object o) Compares the specified object with this map for equality. |
V | forcePut(@Nullable K key, @Nullable V value) An alternate form of put that silently removes any existing entry with the value value before proceeding with the #put operation. |
V | get(Object key) Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key. |
V | getOrDefault(Object key, V defaultValue) Returns the value to which the specified key is mapped, or defaultValue if this map contains no mapping for the key. |
BiMap | inverse() Returns the inverse view of this bimap, which maps each of this bimap's values to its associated key. |
boolean | isEmpty() Returns true if this map contains no key-value mappings. |
Set | keySet() Returns a Set view of the keys contained in this map. |
V | put(@Nullable K key, @Nullable V value) |
void | putAll(Map extends K, ? extends V> map) Warning: the results of calling this method may vary depending on the iteration order of map . |
V | putIfAbsent(K key, V value) If the specified key is not already associated with a value (or is mapped to null ) associates it with the given value and returns null , else returns the current value. |
V | remove(Object key) Removes the mapping for a key from this map if it is present (optional operation). |
int | size() Returns the number of key-value mappings in this map. |
String | toString() Returns a string representation of the object. |
Set | values() Because a bimap has unique values, this method returns a Set , instead of the java.util.Collection specified in the Map interface. |