Package org.elasticsearch.common.collect
Class MapBuilder<K,V>
java.lang.Object
org.elasticsearch.common.collect.MapBuilder<K,V>
public class MapBuilder<K,V>
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description MapBuilder()
MapBuilder(java.util.Map<K,V> map)
-
Method Summary
Modifier and Type Method Description MapBuilder<K,V>
clear()
boolean
containsKey(K key)
V
get(K key)
java.util.Map<K,V>
immutableMap()
Build an immutable copy of the map under construction.boolean
isEmpty()
java.util.Map<K,V>
map()
static <K, V> MapBuilder<K,V>
newMapBuilder()
static <K, V> MapBuilder<K,V>
newMapBuilder(java.util.Map<K,V> map)
MapBuilder<K,V>
put(K key, V value)
MapBuilder<K,V>
putAll(java.util.Map<K,V> map)
MapBuilder<K,V>
remove(K key)
-
Constructor Details
-
MapBuilder
public MapBuilder() -
MapBuilder
-
-
Method Details
-
newMapBuilder
-
newMapBuilder
-
putAll
-
put
-
remove
-
clear
-
get
-
containsKey
-
isEmpty
public boolean isEmpty() -
map
-
immutableMap
Build an immutable copy of the map under construction. Always copies the map under construction. Prefer building a HashMap by hand and wrapping it in an unmodifiableMap
-