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 voidclear()Removes all of the mappings from the map.booleancontainsKey(Object key)Returnstrueif this map contains a mapping for the specified key.booleancontainsValue(Object value)Returnstrueif the map maps one or more keys to the specified value.Set<Map.Entry<K,V>>entrySet()Returns aSetview of the mappings contained in the map.booleanequals(Object o)Compares the specified object with the map for equality.Vget(Object key)Returns the value to which the specified key is mapped, ornullif the map contains no mapping for the key.inthashCode()Returns the hash code value for the map.booleanisEmpty()Returnstrueif the map contains no key-value mappings.Set<K>keySet()Returns aSetview of the keys contained in the map.Vput(K key, V value)Associates the specified value with the specified key in the map.voidputAll(Map<? extends K,? extends V> m)Copies all of the mappings from the specified map to the map.Vremove(Object key)Removes the mapping for a key from the map if it is present.intsize()Returns the number of key-value mappings in this map.Collection<V>values()Returns aCollectionview 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()
Returnstrueif the map contains no key-value mappings.
-
containsKey
public boolean containsKey(Object key)
Returnstrueif this map contains a mapping for the specified key.- Specified by:
containsKeyin interfaceMap<K,V>- Parameters:
key- the key whose presence in this map is to be tested.- Returns:
trueif this map contains a mapping for the specified key.
-
containsValue
public boolean containsValue(Object value)
Returnstrueif the map maps one or more keys to the specified value.- Specified by:
containsValuein interfaceMap<K,V>- Parameters:
value- the value whose presence in the map is to be tested.- Returns:
trueif 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, ornullif 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 aCollectionview of the values contained in the map.
-
entrySet
public Set<Map.Entry<K,V>> entrySet()
Returns aSetview of the mappings contained in the map.
-
hashCode
public int hashCode()
Returns the hash code value for the map.
-
-