java.io.Externalizable, java.io.Serializable, LongIterable, LongLongMap, LongValuesMap, MutableLongLongMap, MutableLongValuesMap, PrimitiveIterable, MutableLongKeysMap, LongKeysMappublic class LongLongHashMap extends AbstractMutableLongValuesMap implements MutableLongLongMap, java.io.Externalizable, MutableLongKeysMap
| Constructor | Description |
|---|---|
LongLongHashMap() |
|
LongLongHashMap(int initialCapacity) |
|
LongLongHashMap(LongLongMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
long |
addToValue(long key,
long toBeAdded) |
|
MutableLongLongMap |
asSynchronized() |
|
MutableLongLongMap |
asUnmodifiable() |
|
void |
clear() |
|
void |
compact() |
Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
|
boolean |
containsKey(long key) |
|
boolean |
equals(java.lang.Object obj) |
Follows the same general contract as
Map.equals(Object). |
MutableLongLongMap |
flipUniqueValues() |
Return the LongLongMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(LongProcedure procedure) |
|
void |
forEachKeyValue(LongLongProcedure procedure) |
|
long |
get(long key) |
|
long |
getIfAbsent(long key,
long ifAbsent) |
|
long |
getIfAbsentPut(long key,
long value) |
|
long |
getIfAbsentPut(long key,
LongFunction0 function) |
|
<P> long |
getIfAbsentPutWith(long key,
LongFunction<? super P> function,
P parameter) |
|
long |
getIfAbsentPutWithKey(long key,
LongToLongFunction function) |
|
long |
getOrThrow(long key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
ObjectLongToObjectFunction<? super V,? extends V> function) |
|
MutableLongSet |
keySet() |
|
LazyLongIterable |
keysView() |
|
RichIterable<LongLongPair> |
keyValuesView() |
|
MutableLongIterator |
longIterator() |
Returns a primitive iterator that can be used to iterate over the LongIterable in an
imperative style.
|
static LongLongHashMap |
newWithKeysValues(long key1,
long value1) |
|
static LongLongHashMap |
newWithKeysValues(long key1,
long value1,
long key2,
long value2) |
|
static LongLongHashMap |
newWithKeysValues(long key1,
long value1,
long key2,
long value2,
long key3,
long value3) |
|
static LongLongHashMap |
newWithKeysValues(long key1,
long value1,
long key2,
long value2,
long key3,
long value3,
long key4,
long value4) |
|
void |
put(long key,
long value) |
|
void |
putAll(LongLongMap map) |
|
void |
readExternal(java.io.ObjectInput in) |
|
LongLongHashMap |
reject(LongLongPredicate predicate) |
|
void |
remove(long key) |
|
void |
removeKey(long key) |
|
long |
removeKeyIfAbsent(long key,
long value) |
|
LongLongHashMap |
select(LongLongPredicate predicate) |
|
ImmutableLongLongMap |
toImmutable() |
|
java.lang.String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
long |
updateValue(long key,
long initialValueIfAbsent,
LongToLongFunction function) |
|
MutableLongCollection |
values() |
|
LongLongHashMap |
withKeysValues(long key1,
long value1,
long key2,
long value2) |
|
LongLongHashMap |
withKeysValues(long key1,
long value1,
long key2,
long value2,
long key3,
long value3) |
|
LongLongHashMap |
withKeysValues(long key1,
long value1,
long key2,
long value2,
long key3,
long value3,
long key4,
long value4) |
|
LongLongHashMap |
withKeyValue(long key1,
long value1) |
|
LongLongHashMap |
withoutAllKeys(LongIterable keys) |
|
LongLongHashMap |
withoutKey(long key) |
|
void |
writeExternal(java.io.ObjectOutput out) |
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListallSatisfy, anySatisfy, appendString, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArrayallSatisfy, anySatisfy, asLazy, average, averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedListisEmpty, notEmpty, sizecontainsValue, forEachValue, tapcollect, reject, selectappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizepublic LongLongHashMap()
public LongLongHashMap(int initialCapacity)
public LongLongHashMap(LongLongMap map)
public static LongLongHashMap newWithKeysValues(long key1, long value1)
public static LongLongHashMap newWithKeysValues(long key1, long value1, long key2, long value2)
public static LongLongHashMap newWithKeysValues(long key1, long value1, long key2, long value2, long key3, long value3)
public static LongLongHashMap newWithKeysValues(long key1, long value1, long key2, long value2, long key3, long value3, long key4, long value4)
public boolean equals(java.lang.Object obj)
LongLongMapMap.equals(Object).equals in interface LongLongMapequals in class java.lang.Objectpublic int hashCode()
LongLongMapMap.hashCode().hashCode in interface LongLongMaphashCode in class java.lang.Objectpublic java.lang.String toString()
PrimitiveIterable
Assert.assertEquals("[]", IntLists.mutable.empty().toString());
Assert.assertEquals("[1]", IntLists.mutable.with(1).toString());
Assert.assertEquals("[1, 2, 3]", IntLists.mutable.with(1, 2, 3).toString());
toString in interface LongLongMaptoString in interface PrimitiveIterabletoString in class AbstractLongIterableAbstractCollection.toString()public MutableLongIterator longIterator()
LongIterablelongIterator in interface LongIterablelongIterator in interface MutableLongValuesMappublic <V> V injectInto(V injectedValue,
ObjectLongToObjectFunction<? super V,? extends V> function)
injectInto in interface LongIterablepublic void clear()
clear in interface MutableLongKeysMapclear in interface MutableLongValuesMappublic void put(long key,
long value)
put in interface MutableLongLongMappublic void putAll(LongLongMap map)
putAll in interface MutableLongLongMappublic void removeKey(long key)
removeKey in interface MutableLongKeysMapremoveKey in interface MutableLongLongMappublic void remove(long key)
remove in interface MutableLongLongMappublic long removeKeyIfAbsent(long key,
long value)
removeKeyIfAbsent in interface MutableLongLongMappublic long getIfAbsentPut(long key,
long value)
getIfAbsentPut in interface MutableLongLongMappublic long getIfAbsentPut(long key,
LongFunction0 function)
getIfAbsentPut in interface MutableLongLongMappublic <P> long getIfAbsentPutWith(long key,
LongFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableLongLongMappublic long getIfAbsentPutWithKey(long key,
LongToLongFunction function)
getIfAbsentPutWithKey in interface MutableLongLongMappublic long addToValue(long key,
long toBeAdded)
addToValue in interface MutableLongLongMappublic long updateValue(long key,
long initialValueIfAbsent,
LongToLongFunction function)
updateValue in interface MutableLongLongMappublic LongLongHashMap withKeyValue(long key1, long value1)
withKeyValue in interface MutableLongLongMappublic LongLongHashMap withKeysValues(long key1, long value1, long key2, long value2)
public LongLongHashMap withKeysValues(long key1, long value1, long key2, long value2, long key3, long value3)
public LongLongHashMap withKeysValues(long key1, long value1, long key2, long value2, long key3, long value3, long key4, long value4)
public LongLongHashMap withoutKey(long key)
withoutKey in interface MutableLongLongMappublic LongLongHashMap withoutAllKeys(LongIterable keys)
withoutAllKeys in interface MutableLongLongMappublic MutableLongLongMap asUnmodifiable()
asUnmodifiable in interface MutableLongLongMappublic MutableLongLongMap asSynchronized()
asSynchronized in interface MutableLongLongMappublic ImmutableLongLongMap toImmutable()
toImmutable in interface LongLongMappublic long get(long key)
get in interface LongLongMappublic long getIfAbsent(long key,
long ifAbsent)
getIfAbsent in interface LongLongMappublic long getOrThrow(long key)
getOrThrow in interface LongLongMappublic boolean containsKey(long key)
containsKey in interface LongKeysMapcontainsKey in interface LongLongMappublic void forEachKey(LongProcedure procedure)
forEachKey in interface LongKeysMapforEachKey in interface LongLongMappublic void forEachKeyValue(LongLongProcedure procedure)
forEachKeyValue in interface LongLongMappublic LazyLongIterable keysView()
keysView in interface LongLongMappublic RichIterable<LongLongPair> keyValuesView()
keyValuesView in interface LongLongMappublic MutableLongLongMap flipUniqueValues()
LongLongMapflipUniqueValues in interface LongLongMapflipUniqueValues in interface MutableLongLongMappublic LongLongHashMap select(LongLongPredicate predicate)
select in interface LongLongMapselect in interface MutableLongLongMappublic LongLongHashMap reject(LongLongPredicate predicate)
reject in interface LongLongMapreject in interface MutableLongLongMappublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic void compact()
public MutableLongSet keySet()
keySet in interface LongLongMappublic MutableLongCollection values()
values in interface LongValuesMapCopyright © 2004–2017. All rights reserved.