Package net.shibboleth.shared.collection
Class LazyMap<KeyType,ValueType>
java.lang.Object
net.shibboleth.shared.collection.LazyMap<KeyType,ValueType>
- Type Parameters:
KeyType- the type of the map keysValueType- the type of the map values
- All Implemented Interfaces:
Serializable,Map<KeyType,ValueType>
@NotThreadSafe
public class LazyMap<KeyType,ValueType>
extends Object
implements Map<KeyType,ValueType>, Serializable
A map that is lazy initialized. This map takes very little memory when storing zero or one item.
- See Also:
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe delegate map.private static final longSerial version UID. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial version UID.- See Also:
-
delegate
The delegate map.
-
-
Constructor Details
-
LazyMap
public LazyMap()
-
-
Method Details
-
clear
public void clear() -
containsKey
- Specified by:
containsKeyin interfaceMap<KeyType,ValueType>
-
containsValue
- Specified by:
containsValuein interfaceMap<KeyType,ValueType>
-
entrySet
-
get
-
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
remove
-
size
public int size() -
values
-
buildMap
Builds an appropriate delegate map.- Returns:
- the delegate map
-
toString
-
hashCode
public int hashCode() -
equals
-