Java com.google.common.collect BiMap fields, constructors, methods, implement or subclass

Example usage for Java com.google.common.collect BiMap fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.common.collect BiMap.

The text is from its open source code.

Implementation

com.google.common.collect.BiMap has the following implementations.
Click this link to see all its implementation.

Method

voidclear()
Removes all of the mappings from this map (optional operation).
VcomputeIfAbsent(K key, Function 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 .
booleancontainsKey(Object key)
Returns true if this map contains a mapping for the specified key.
booleancontainsValue(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.
booleanequals(Object o)
Compares the specified object with this map for equality.
VforcePut(@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.
Vget(Object key)
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
VgetOrDefault(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.
BiMapinverse()
Returns the inverse view of this bimap, which maps each of this bimap's values to its associated key.
booleanisEmpty()
Returns true if this map contains no key-value mappings.
SetkeySet()
Returns a Set view of the keys contained in this map.
Vput(@Nullable K key, @Nullable V value)
voidputAll(Map map)

Warning: the results of calling this method may vary depending on the iteration order of map .

VputIfAbsent(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.
Vremove(Object key)
Removes the mapping for a key from this map if it is present (optional operation).
intsize()
Returns the number of key-value mappings in this map.
StringtoString()
Returns a string representation of the object.
Setvalues()

Because a bimap has unique values, this method returns a Set , instead of the java.util.Collection specified in the Map interface.