Package org.apache.groovy.json.internal
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
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
-
Constructor Details
-
LazyMap
public LazyMap() -
LazyMap
public LazyMap(int initialSize)
-
-
Method Details
-
put
-
entrySet
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsValue
- Specified by:
containsValue
in interfaceMap<String,
Object> - Overrides:
containsValue
in classAbstractMap<String,
Object>
-
containsKey
- Specified by:
containsKey
in interfaceMap<String,
Object> - Overrides:
containsKey
in classAbstractMap<String,
Object>
-
get
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
equals
-
hashCode
public int hashCode() -
toString
- Overrides:
toString
in classAbstractMap<String,
Object>
-
clone
- Overrides:
clone
in classAbstractMap<String,
Object> - Throws:
CloneNotSupportedException
-
clearAndCopy
-
grow
public static <V> V[] grow(V[] array)
-