Package org.apache.groovy.json.internal
Class LazyMap
public class LazyMap extends AbstractMap<String,Object>
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
Modifier and Type Method Description voidclear()LazyMapclearAndCopy()protected Objectclone()booleancontainsKey(Object key)booleancontainsValue(Object value)Set<Map.Entry<String,Object>>entrySet()booleanequals(Object o)Objectget(Object key)static <V> V[]grow(V[] array)inthashCode()booleanisEmpty()Set<String>keySet()Objectput(String key, Object value)voidputAll(Map m)Objectremove(Object key)intsize()StringtoString()Collection<Object>values()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
Method Details
-
put
-
entrySet
-
size
public int size() -
isEmpty
public boolean 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
public void clear() -
keySet
-
values
-
equals
-
hashCode
public int hashCode() -
toString
- Overrides:
toStringin classAbstractMap<String,Object>
-
clone
- Overrides:
clonein classAbstractMap<String,Object>- Throws:
CloneNotSupportedException
-
clearAndCopy
-
grow
public static <V> V[] grow(V[] array)
-