Class LazyMap<K,V>
java.lang.Object
org.forgerock.util.LazyMap<K,V>
- Type Parameters:
K- The type of key.V- The type of value.
- All Implemented Interfaces:
Map<K,V>
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()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.entrySet()Returns aSetview of the mappings contained in the map.booleanCompares the specified object with the map for equality.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.keySet()Returns aSetview of the keys contained in the map.Associates the specified value with the specified key in the map.voidCopies all of the mappings from the specified map to the map.Removes the mapping for a key from the map if it is present.intsize()Returns the number of key-value mappings in this map.values()Returns aCollectionview of the values contained in the map.Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
factory
-
-
Constructor Details
-
LazyMap
protected LazyMap()Constructs a new lazy map. Allows factory to be set in subclass constructor. -
LazyMap
-
-
Method Details
-
size
-
isEmpty
-
containsKey
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
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
Returns the value to which the specified key is mapped, ornullif the map contains no mapping for the key. -
put
Associates the specified value with the specified key in the map. -
remove
-
putAll
-
clear
-
keySet
-
values
Returns aCollectionview of the values contained in the map. -
entrySet
-
hashCode
-
equals
-