Package com.fasterxml.jackson.jr.ob.impl
Class DeferredMap
- java.lang.Object
-
- java.util.AbstractMap<Object,Object>
-
- com.fasterxml.jackson.jr.ob.impl.DeferredMap
-
public class DeferredMap extends AbstractMap<Object,Object>
A specializedMapimplementation that will collect entries during building, but only materialize full lookup structure when needed; that is, actual building of hash lookup is deferred.Inspired by lazily initialized Map used by Boon library.
-
-
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
Constructors Constructor Description DeferredMap(boolean ordered)DeferredMap(boolean ordered, int initialSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<Object,Object>_buildMap(int expSize)protected voidbuildIfNeeded()voidclear()protected Objectclone()booleancontainsKey(Object key)booleancontainsValue(Object value)Set<Map.Entry<Object,Object>>entrySet()booleanequals(Object other)Objectget(Object key)inthashCode()booleanisEmpty()Set<Object>keySet()Objectput(Object key, Object value)Objectremove(Object key)intsize()StringtoString()Collection<Object>values()-
Methods inherited from class java.util.AbstractMap
putAll
-
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
-
-
-
-
Method Detail
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap<Object,Object>- Overrides:
containsValuein classAbstractMap<Object,Object>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<Object,Object>- Overrides:
containsKeyin classAbstractMap<Object,Object>
-
clear
public void clear()
-
values
public Collection<Object> values()
-
equals
public boolean equals(Object other)
-
hashCode
public int hashCode()
-
toString
public String toString()
- Overrides:
toStringin classAbstractMap<Object,Object>
-
clone
protected Object clone() throws CloneNotSupportedException
- Overrides:
clonein classAbstractMap<Object,Object>- Throws:
CloneNotSupportedException
-
buildIfNeeded
protected void buildIfNeeded()
-
-