Class LazyMap<KeyType,ValueType>
- java.lang.Object
-
- net.shibboleth.utilities.java.support.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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private Map<KeyType,ValueType>delegateThe delegate map.private static longserialVersionUIDSerial version UID.
-
Constructor Summary
Constructors Constructor Description LazyMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<KeyType,ValueType>buildMap()Builds an appropriate delegate map.voidclear()booleancontainsKey(Object key)booleancontainsValue(Object value)Set<Map.Entry<KeyType,ValueType>>entrySet()booleanequals(Object obj)ValueTypeget(Object key)inthashCode()booleanisEmpty()Set<KeyType>keySet()ValueTypeput(KeyType key, ValueType value)voidputAll(Map<? extends KeyType,? extends ValueType> t)ValueTyperemove(Object key)intsize()StringtoString()Collection<ValueType>values()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Serial version UID.- See Also:
- Constant Field Values
-
-
Method Detail
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<KeyType,ValueType>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap<KeyType,ValueType>
-
values
public Collection<ValueType> values()
-
buildMap
protected Map<KeyType,ValueType> buildMap()
Builds an appropriate delegate map.- Returns:
- the delegate map
-
hashCode
public int hashCode()
-
-