public class DeferredMap extends AbstractMap<String,Object>
Map implementation 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.
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
DeferredMap(boolean ordered) |
DeferredMap(boolean ordered,
int initialSize) |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
_buildMap(int expSize) |
protected void |
buildIfNeeded() |
void |
clear() |
protected Object |
clone() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,Object>> |
entrySet() |
boolean |
equals(Object other) |
Object |
get(Object key) |
int |
hashCode() |
boolean |
isEmpty() |
Set<String> |
keySet() |
Object |
put(String key,
Object value) |
Object |
remove(Object key) |
int |
size() |
String |
toString() |
Collection<Object> |
values() |
putAllfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic DeferredMap(boolean ordered)
public DeferredMap(boolean ordered,
int initialSize)
public int size()
public boolean isEmpty()
public boolean containsValue(Object value)
containsValue in interface Map<String,Object>containsValue in class AbstractMap<String,Object>public boolean containsKey(Object key)
containsKey in interface Map<String,Object>containsKey in class AbstractMap<String,Object>public void clear()
public Collection<Object> values()
public boolean equals(Object other)
public int hashCode()
public String toString()
toString in class AbstractMap<String,Object>protected Object clone() throws CloneNotSupportedException
clone in class AbstractMap<String,Object>CloneNotSupportedExceptionprotected void buildIfNeeded()
Copyright © 2024 FasterXML. All rights reserved.