public final class ImmutableOpenLongMap<VType> extends Object implements Iterable<com.carrotsearch.hppc.cursors.LongObjectCursor<VType>>
builder()
, or using builder(org.elasticsearch.common.collect.ImmutableOpenLongMap)
(which is an optimized
option to copy over existing content and modify it).Modifier and Type | Class and Description |
---|---|
static class |
ImmutableOpenLongMap.Builder<VType> |
Modifier and Type | Method and Description |
---|---|
static <VType> ImmutableOpenLongMap.Builder<VType> |
builder() |
static <VType> ImmutableOpenLongMap.Builder<VType> |
builder(ImmutableOpenLongMap<VType> map) |
static <VType> ImmutableOpenLongMap.Builder<VType> |
builder(int size) |
boolean |
containsKey(long key)
Returns
true if this container has an association to a value for
the given key. |
boolean |
equals(Object o) |
VType |
get(long key) |
int |
hashCode() |
boolean |
isEmpty() |
Iterator<com.carrotsearch.hppc.cursors.LongObjectCursor<VType>> |
iterator()
Returns a cursor over the entries (key-value pairs) in this map.
|
com.carrotsearch.hppc.LongLookupContainer |
keys()
Returns a specialized view of the keys of this associated container.
|
com.google.common.collect.UnmodifiableIterator<Long> |
keysIt()
Returns a direct iterator over the keys.
|
static <VType> ImmutableOpenLongMap<VType> |
of() |
int |
size() |
String |
toString() |
com.carrotsearch.hppc.ObjectContainer<VType> |
values() |
com.google.common.collect.UnmodifiableIterator<VType> |
valuesIt()
Returns a direct iterator over the keys.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public VType get(long key)
public boolean containsKey(long key)
true
if this container has an association to a value for
the given key.public int size()
public boolean isEmpty()
true
if this hash map contains no assigned keys.public Iterator<com.carrotsearch.hppc.cursors.LongObjectCursor<VType>> iterator()
Iterator.next()
. To read the current key and value use the cursor's
public fields. An example is shown below.
for (IntShortCursor c : intShortMap) { System.out.println("index=" + c.index + " key=" + c.key + " value=" + c.value); }
The index
field inside the cursor gives the internal index inside
the container's implementation. The interpretation of this index depends on
to the container.
public com.carrotsearch.hppc.LongLookupContainer keys()
ObjectLookupContainer
.public com.google.common.collect.UnmodifiableIterator<Long> keysIt()
public com.carrotsearch.hppc.ObjectContainer<VType> values()
public com.google.common.collect.UnmodifiableIterator<VType> valuesIt()
public static <VType> ImmutableOpenLongMap<VType> of()
public static <VType> ImmutableOpenLongMap.Builder<VType> builder()
public static <VType> ImmutableOpenLongMap.Builder<VType> builder(int size)
public static <VType> ImmutableOpenLongMap.Builder<VType> builder(ImmutableOpenLongMap<VType> map)
Copyright © 2009–2015. All rights reserved.