Modifier and Type | Class and Description |
---|---|
class |
Long2LongHashMap.LongIterator
Adds an unboxed next() method to the standard Iterator interface.
|
class |
Long2LongHashMap.LongLongCursor
Implements the cursor.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_INITIAL_CAPACITY
The default initial capacity for constructors not explicitly supplying it
|
static double |
DEFAULT_LOAD_FACTOR
The default load factor for constructors not explicitly supplying it
|
Constructor and Description |
---|
Long2LongHashMap(int initialCapacity,
double loadFactor,
long missingValue) |
Long2LongHashMap(long missingValue) |
Long2LongHashMap(Long2LongHashMap that) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(long key)
Long primitive specialised containsKey.
|
boolean |
containsKey(Object key) |
boolean |
containsValue(long value) |
boolean |
containsValue(Object value) |
Long2LongHashMap.LongLongCursor |
cursor()
Provides a cursor over the map's entries.
|
Set<Map.Entry<Long,Long>> |
entrySet()
This set's iterator also implements
Map.Entry
so the next() method can just return the iterator
instance itself with no heap allocation. |
void |
forEach(BiConsumer<? super Long,? super Long> action) |
long |
get(long key) |
Long |
get(Object key) |
boolean |
isEmpty() |
Set<Long> |
keySet() |
void |
longForEach(LongLongConsumer consumer)
Primitive specialised forEach implementation.
|
long |
put(long key,
long value) |
Long |
put(Long key,
Long value) |
void |
putAll(Map<? extends Long,? extends Long> map) |
long |
remove(long key) |
Long |
remove(Object key) |
int |
size() |
String |
toString() |
Collection<Long> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
public static final double DEFAULT_LOAD_FACTOR
public static final int DEFAULT_INITIAL_CAPACITY
public Long2LongHashMap(int initialCapacity, double loadFactor, long missingValue)
public Long2LongHashMap(long missingValue)
public Long2LongHashMap(Long2LongHashMap that)
public long get(long key)
public long put(long key, long value)
public void longForEach(LongLongConsumer consumer)
consumer
- a callback called for each key/value pair in the map.public Long2LongHashMap.LongLongCursor cursor()
entrySet().iterator()
,
but with a simpler and more clear API.public boolean containsKey(long key)
key
- the key to check.public boolean containsValue(long value)
public void forEach(BiConsumer<? super Long,? super Long> action)
public boolean containsKey(Object key)
containsKey
in interface Map<Long,Long>
public boolean containsValue(Object value)
containsValue
in interface Map<Long,Long>
public Set<Map.Entry<Long,Long>> entrySet()
Map.Entry
so the next()
method can just return the iterator
instance itself with no heap allocation. This characteristic
makes the set unusable wherever the returned entries are
retained (such as coll.addAll(entrySet)
.public long remove(long key)
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.