Package org.elasticsearch.common.collect
Class ImmutableOpenIntMap.Builder<VType>
- java.lang.Object
-
- org.elasticsearch.common.collect.ImmutableOpenIntMap.Builder<VType>
-
- All Implemented Interfaces:
com.carrotsearch.hppc.IntObjectAssociativeContainer<VType>
,com.carrotsearch.hppc.IntObjectMap<VType>
,java.lang.Iterable<com.carrotsearch.hppc.cursors.IntObjectCursor<VType>>
- Enclosing class:
- ImmutableOpenIntMap<VType>
public static class ImmutableOpenIntMap.Builder<VType> extends java.lang.Object implements com.carrotsearch.hppc.IntObjectMap<VType>
-
-
Constructor Summary
Constructors Constructor Description Builder()
Builder(int size)
Builder(ImmutableOpenIntMap<VType> map)
-
Method Summary
Modifier and Type Method Description ImmutableOpenIntMap<VType>
build()
Builds a new instance of thevoid
clear()
boolean
containsKey(int key)
<T extends com.carrotsearch.hppc.procedures.IntObjectProcedure<? super VType>>
TforEach(T procedure)
ImmutableOpenIntMap.Builder<VType>
fPut(int key, VType value)
A put operation that can be used in the fluent pattern.ImmutableOpenIntMap.Builder<VType>
fRemove(int key)
Remove that can be used in the fluent pattern.VType
get(int key)
VType
getOrDefault(int kType, VType vType)
boolean
indexExists(int index)
VType
indexGet(int index)
void
indexInsert(int index, int key, VType value)
int
indexOf(int key)
VType
indexReplace(int index, VType newValue)
boolean
isEmpty()
java.util.Iterator<com.carrotsearch.hppc.cursors.IntObjectCursor<VType>>
iterator()
com.carrotsearch.hppc.IntCollection
keys()
VType
put(int key, VType value)
int
putAll(com.carrotsearch.hppc.IntObjectAssociativeContainer<? extends VType> container)
int
putAll(java.lang.Iterable<? extends com.carrotsearch.hppc.cursors.IntObjectCursor<? extends VType>> iterable)
ImmutableOpenIntMap.Builder<VType>
putAll(java.util.Map<java.lang.Integer,VType> map)
Puts all the entries in the map to the builder.void
release()
VType
remove(int key)
int
removeAll(com.carrotsearch.hppc.IntContainer container)
int
removeAll(com.carrotsearch.hppc.predicates.IntObjectPredicate<? super VType> predicate)
int
removeAll(com.carrotsearch.hppc.predicates.IntPredicate predicate)
int
size()
com.carrotsearch.hppc.ObjectContainer<VType>
values()
java.lang.String
visualizeKeyDistribution(int characters)
-
-
-
Constructor Detail
-
Builder
public Builder()
-
Builder
public Builder(int size)
-
Builder
public Builder(ImmutableOpenIntMap<VType> map)
-
-
Method Detail
-
build
public ImmutableOpenIntMap<VType> build()
Builds a new instance of the
-
putAll
public ImmutableOpenIntMap.Builder<VType> putAll(java.util.Map<java.lang.Integer,VType> map)
Puts all the entries in the map to the builder.
-
fPut
public ImmutableOpenIntMap.Builder<VType> fPut(int key, VType value)
A put operation that can be used in the fluent pattern.
-
put
public VType put(int key, VType value)
- Specified by:
put
in interfacecom.carrotsearch.hppc.IntObjectMap<VType>
-
get
public VType get(int key)
- Specified by:
get
in interfacecom.carrotsearch.hppc.IntObjectMap<VType>
-
getOrDefault
public VType getOrDefault(int kType, VType vType)
- Specified by:
getOrDefault
in interfacecom.carrotsearch.hppc.IntObjectMap<VType>
-
fRemove
public ImmutableOpenIntMap.Builder<VType> fRemove(int key)
Remove that can be used in the fluent pattern.
-
remove
public VType remove(int key)
- Specified by:
remove
in interfacecom.carrotsearch.hppc.IntObjectMap<VType>
-
iterator
public java.util.Iterator<com.carrotsearch.hppc.cursors.IntObjectCursor<VType>> iterator()
-
containsKey
public boolean containsKey(int key)
- Specified by:
containsKey
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<VType>
-
size
public int size()
- Specified by:
size
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<VType>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<VType>
-
clear
public void clear()
- Specified by:
clear
in interfacecom.carrotsearch.hppc.IntObjectMap<VType>
-
putAll
public int putAll(com.carrotsearch.hppc.IntObjectAssociativeContainer<? extends VType> container)
- Specified by:
putAll
in interfacecom.carrotsearch.hppc.IntObjectMap<VType>
-
putAll
public int putAll(java.lang.Iterable<? extends com.carrotsearch.hppc.cursors.IntObjectCursor<? extends VType>> iterable)
- Specified by:
putAll
in interfacecom.carrotsearch.hppc.IntObjectMap<VType>
-
removeAll
public int removeAll(com.carrotsearch.hppc.IntContainer container)
- Specified by:
removeAll
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<VType>
-
removeAll
public int removeAll(com.carrotsearch.hppc.predicates.IntPredicate predicate)
- Specified by:
removeAll
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<VType>
-
forEach
public <T extends com.carrotsearch.hppc.procedures.IntObjectProcedure<? super VType>> T forEach(T procedure)
- Specified by:
forEach
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<VType>
-
keys
public com.carrotsearch.hppc.IntCollection keys()
- Specified by:
keys
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<VType>
-
values
public com.carrotsearch.hppc.ObjectContainer<VType> values()
- Specified by:
values
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<VType>
-
removeAll
public int removeAll(com.carrotsearch.hppc.predicates.IntObjectPredicate<? super VType> predicate)
- Specified by:
removeAll
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<VType>
-
forEach
public <T extends com.carrotsearch.hppc.predicates.IntObjectPredicate<? super VType>> T forEach(T predicate)
- Specified by:
forEach
in interfacecom.carrotsearch.hppc.IntObjectAssociativeContainer<VType>
-
indexOf
public int indexOf(int key)
- Specified by:
indexOf
in interfacecom.carrotsearch.hppc.IntObjectMap<VType>
-
indexExists
public boolean indexExists(int index)
- Specified by:
indexExists
in interfacecom.carrotsearch.hppc.IntObjectMap<VType>
-
indexGet
public VType indexGet(int index)
- Specified by:
indexGet
in interfacecom.carrotsearch.hppc.IntObjectMap<VType>
-
indexReplace
public VType indexReplace(int index, VType newValue)
- Specified by:
indexReplace
in interfacecom.carrotsearch.hppc.IntObjectMap<VType>
-
indexInsert
public void indexInsert(int index, int key, VType value)
- Specified by:
indexInsert
in interfacecom.carrotsearch.hppc.IntObjectMap<VType>
-
release
public void release()
- Specified by:
release
in interfacecom.carrotsearch.hppc.IntObjectMap<VType>
-
visualizeKeyDistribution
public java.lang.String visualizeKeyDistribution(int characters)
- Specified by:
visualizeKeyDistribution
in interfacecom.carrotsearch.hppc.IntObjectMap<VType>
-
-