Package org.forgerock.util
Class LazyMap<K,V>
- java.lang.Object
-
- org.forgerock.util.LazyMap<K,V>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Removes all of the mappings from the map.boolean
containsKey(Object key)
Returnstrue
if this map contains a mapping for the specified key.boolean
containsValue(Object value)
Returnstrue
if the map maps one or more keys to the specified value.Set<Map.Entry<K,V>>
entrySet()
Returns aSet
view of the mappings contained in the map.boolean
equals(Object o)
Compares the specified object with the map for equality.V
get(Object key)
Returns the value to which the specified key is mapped, ornull
if the map contains no mapping for the key.int
hashCode()
Returns the hash code value for the map.boolean
isEmpty()
Returnstrue
if the map contains no key-value mappings.Set<K>
keySet()
Returns aSet
view of the keys contained in the map.V
put(K key, V value)
Associates the specified value with the specified key in the map.void
putAll(Map<? extends K,? extends V> m)
Copies all of the mappings from the specified map to the map.V
remove(Object key)
Removes the mapping for a key from the map if it is present.int
size()
Returns the number of key-value mappings in this map.Collection<V>
values()
Returns aCollection
view of the values contained in the map.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
size
public int size()
Returns the number of key-value mappings in this map.
-
isEmpty
public boolean isEmpty()
Returnstrue
if the map contains no key-value mappings.
-
containsKey
public boolean containsKey(Object key)
Returnstrue
if this map contains a mapping for the specified key.- Specified by:
containsKey
in interfaceMap<K,V>
- Parameters:
key
- the key whose presence in this map is to be tested.- Returns:
true
if this map contains a mapping for the specified key.
-
containsValue
public boolean containsValue(Object value)
Returnstrue
if the map maps one or more keys to the specified value.- Specified by:
containsValue
in interfaceMap<K,V>
- Parameters:
value
- the value whose presence in the map is to be tested.- Returns:
true
if the map maps one or more keys to the specified value.
-
get
public V get(Object key)
Returns the value to which the specified key is mapped, ornull
if the map contains no mapping for the key.
-
putAll
public void putAll(Map<? extends K,? extends V> m)
Copies all of the mappings from the specified map to the map.
-
clear
public void clear()
Removes all of the mappings from the map.
-
values
public Collection<V> values()
Returns aCollection
view of the values contained in the map.
-
entrySet
public Set<Map.Entry<K,V>> entrySet()
Returns aSet
view of the mappings contained in the map.
-
hashCode
public int hashCode()
Returns the hash code value for the map.
-
-