Class LazyMap
This maps only builds once you ask for a key for the first time.
It is designed to not incur the overhead of creating a map unless needed.
- Author:
- Rick Hightower
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
LazyMap
public LazyMap() -
LazyMap
public LazyMap(int initialSize)
-
-
Method Details
-
put
-
entrySet
-
size
-
isEmpty
-
containsValue
- Specified by:
containsValuein interfaceMap<String,Object> - Overrides:
containsValuein classAbstractMap<String,Object>
-
containsKey
- Specified by:
containsKeyin interfaceMap<String,Object> - Overrides:
containsKeyin classAbstractMap<String,Object>
-
get
-
remove
-
putAll
-
clear
-
keySet
-
values
-
equals
-
hashCode
-
toString
- Overrides:
toStringin classAbstractMap<String,Object>
-
clone
- Overrides:
clonein classAbstractMap<String,Object> - Throws:
CloneNotSupportedException
-
clearAndCopy
-
grow
public static <V> V[] grow(V[] array)
-