Module org.elasticsearch.server
Package org.elasticsearch.common.collect
Class ImmutableOpenMap<KType,VType> 
java.lang.Object
java.util.AbstractMap<KType,VType>
 
org.elasticsearch.common.collect.ImmutableOpenMap<KType,VType> 
- All Implemented Interfaces:
- Map<KType,- VType> 
An immutable map implementation based on open hash map.
 
 Can be constructed using a builder(), or using builder(Map) (which is an optimized
 option to copy over existing content and modify it).
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class java.util.AbstractMapAbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> 
- 
Method SummaryModifier and TypeMethodDescriptionstatic <KType,VType> 
 ImmutableOpenMap.Builder<KType,VType> builder()static <KType,VType> 
 ImmutableOpenMap.Builder<KType,VType> builder(int size) static <KType,VType> 
 ImmutableOpenMap.Builder<KType,VType> voidclear()booleancontainsKey(Object key) Returnstrueif this container has an association to a value for the given key.booleancontainsValue(Object value) entrySet()voidforEach(BiConsumer<? super KType, ? super VType> action) getOrDefault(Object key, VType defaultValue) booleanisEmpty()keySet()static <KType,VType> 
 ImmutableOpenMap<KType,VType> of()voidintsize()toString()values()Methods inherited from class java.util.AbstractMapclone, equals, hashCodeMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, merge, putIfAbsent, remove, replace, replace, replaceAll
- 
Method Details- 
get- Specified by:
- getin interface- Map<KType,- VType> 
- Overrides:
- getin class- AbstractMap<KType,- VType> 
- Returns:
- Returns the value associated with the given key or the default value
 for the key type, if the key is not associated with any value.
 Important note: For primitive type values, the value returned for a non-existing key may not be the default value of the primitive type (it may be any value previously assigned to that slot). 
 
- 
getOrDefault- Returns:
- Returns the value associated with the given key or the provided default value if the key is not associated with any value.
 
- 
containsKeyReturnstrueif this container has an association to a value for the given key.- Specified by:
- containsKeyin interface- Map<KType,- VType> 
- Overrides:
- containsKeyin class- AbstractMap<KType,- VType> 
 
- 
containsValue- Specified by:
- containsValuein interface- Map<KType,- VType> 
- Overrides:
- containsValuein class- AbstractMap<KType,- VType> 
 
- 
put
- 
remove
- 
putAll
- 
clearpublic void clear()
- 
sizepublic int size()
- 
isEmptypublic boolean isEmpty()
- 
entrySet
- 
keySet
- 
values
- 
forEach
- 
toString- Overrides:
- toStringin class- AbstractMap<KType,- VType> 
 
- 
of
- 
builder
- 
builder
- 
builder
 
-