Package org.elasticsearch.common.collect
Class ImmutableOpenMap.Builder<KType,VType>
- java.lang.Object
-
- org.elasticsearch.common.collect.ImmutableOpenMap.Builder<KType,VType>
-
- All Implemented Interfaces:
com.carrotsearch.hppc.ObjectObjectAssociativeContainer<KType,VType>,com.carrotsearch.hppc.ObjectObjectMap<KType,VType>,java.lang.Iterable<com.carrotsearch.hppc.cursors.ObjectObjectCursor<KType,VType>>
- Enclosing class:
- ImmutableOpenMap<KType,VType>
public static class ImmutableOpenMap.Builder<KType,VType> extends java.lang.Object implements com.carrotsearch.hppc.ObjectObjectMap<KType,VType>
-
-
Method Summary
Modifier and Type Method Description ImmutableOpenMap<KType,VType>build()Builds a new instance of the<K,V>
ImmutableOpenMap.Builder<K,V>cast()voidclear()booleancontainsKey(KType key)<T extends com.carrotsearch.hppc.procedures.ObjectObjectProcedure<? super KType,? super VType>>
TforEach(T procedure)ImmutableOpenMap.Builder<KType,VType>fPut(KType key, VType value)A put operation that can be used in the fluent pattern.ImmutableOpenMap.Builder<KType,VType>fRemove(KType key)Remove that can be used in the fluent pattern.VTypeget(KType key)VTypegetOrDefault(KType kType, VType vType)booleanindexExists(int index)VTypeindexGet(int index)voidindexInsert(int index, KType key, VType value)intindexOf(KType key)VTypeindexReplace(int index, VType newValue)booleanisEmpty()java.util.Iterator<com.carrotsearch.hppc.cursors.ObjectObjectCursor<KType,VType>>iterator()com.carrotsearch.hppc.ObjectCollection<KType>keys()VTypeput(KType key, VType value)intputAll(com.carrotsearch.hppc.ObjectObjectAssociativeContainer<? extends KType,? extends VType> container)intputAll(java.lang.Iterable<? extends com.carrotsearch.hppc.cursors.ObjectObjectCursor<? extends KType,? extends VType>> iterable)ImmutableOpenMap.Builder<KType,VType>putAll(java.util.Map<KType,VType> map)Puts all the entries in the map to the builder.voidrelease()VTyperemove(KType key)intremoveAll(com.carrotsearch.hppc.ObjectContainer<? super KType> container)intremoveAll(com.carrotsearch.hppc.predicates.ObjectObjectPredicate<? super KType,? super VType> predicate)intremoveAll(com.carrotsearch.hppc.predicates.ObjectPredicate<? super KType> predicate)intsize()com.carrotsearch.hppc.ObjectContainer<VType>values()java.lang.StringvisualizeKeyDistribution(int characters)
-
-
-
Constructor Detail
-
Builder
public Builder()
-
Builder
public Builder(int size)
-
Builder
public Builder(ImmutableOpenMap<KType,VType> map)
-
-
Method Detail
-
build
public ImmutableOpenMap<KType,VType> build()
Builds a new instance of the
-
putAll
public ImmutableOpenMap.Builder<KType,VType> putAll(java.util.Map<KType,VType> map)
Puts all the entries in the map to the builder.
-
fPut
public ImmutableOpenMap.Builder<KType,VType> fPut(KType key, VType value)
A put operation that can be used in the fluent pattern.
-
putAll
public int putAll(com.carrotsearch.hppc.ObjectObjectAssociativeContainer<? extends KType,? extends VType> container)
-
putAll
public int putAll(java.lang.Iterable<? extends com.carrotsearch.hppc.cursors.ObjectObjectCursor<? extends KType,? extends VType>> iterable)
-
fRemove
public ImmutableOpenMap.Builder<KType,VType> fRemove(KType key)
Remove that can be used in the fluent pattern.
-
iterator
public java.util.Iterator<com.carrotsearch.hppc.cursors.ObjectObjectCursor<KType,VType>> iterator()
-
containsKey
public boolean containsKey(KType key)
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
removeAll
public int removeAll(com.carrotsearch.hppc.ObjectContainer<? super KType> container)
-
removeAll
public int removeAll(com.carrotsearch.hppc.predicates.ObjectPredicate<? super KType> predicate)
-
forEach
public <T extends com.carrotsearch.hppc.procedures.ObjectObjectProcedure<? super KType,? super VType>> T forEach(T procedure)
-
clear
public void clear()
-
keys
public com.carrotsearch.hppc.ObjectCollection<KType> keys()
-
values
public com.carrotsearch.hppc.ObjectContainer<VType> values()
-
cast
public <K,V> ImmutableOpenMap.Builder<K,V> cast()
-
removeAll
public int removeAll(com.carrotsearch.hppc.predicates.ObjectObjectPredicate<? super KType,? super VType> predicate)
-
forEach
public <T extends com.carrotsearch.hppc.predicates.ObjectObjectPredicate<? super KType,? super VType>> T forEach(T predicate)
-
indexOf
public int indexOf(KType key)
-
indexExists
public boolean indexExists(int index)
-
indexGet
public VType indexGet(int index)
-
release
public void release()
-
-