Externalizable, Serializable, LongIterable, IntLongMap, LongValuesMap, MutableIntLongMap, MutableLongValuesMap, PrimitiveIterable, MutableIntKeysMap, IntKeysMappublic class IntLongHashMap extends AbstractMutableLongValuesMap implements MutableIntLongMap, Externalizable, MutableIntKeysMap
| Constructor | Description |
|---|---|
IntLongHashMap() |
|
IntLongHashMap(int initialCapacity) |
|
IntLongHashMap(IntLongMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
long |
addToValue(int key,
long toBeAdded) |
|
MutableIntLongMap |
asSynchronized() |
|
MutableIntLongMap |
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(int key) |
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object). |
MutableLongIntMap |
flipUniqueValues() |
Return the LongIntMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(IntProcedure procedure) |
|
void |
forEachKeyValue(IntLongProcedure procedure) |
|
long |
get(int key) |
|
long |
getIfAbsent(int key,
long ifAbsent) |
|
long |
getIfAbsentPut(int key,
long value) |
|
long |
getIfAbsentPut(int key,
LongFunction0 function) |
|
<P> long |
getIfAbsentPutWith(int key,
LongFunction<? super P> function,
P parameter) |
|
long |
getIfAbsentPutWithKey(int key,
IntToLongFunction function) |
|
long |
getOrThrow(int key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
ObjectLongToObjectFunction<? super V,? extends V> function) |
|
MutableIntSet |
keySet() |
|
LazyIntIterable |
keysView() |
|
RichIterable<IntLongPair> |
keyValuesView() |
|
MutableLongIterator |
longIterator() |
Returns a primitive iterator that can be used to iterate over the LongIterable in an
imperative style.
|
static IntLongHashMap |
newWithKeysValues(int key1,
long value1) |
|
static IntLongHashMap |
newWithKeysValues(int key1,
long value1,
int key2,
long value2) |
|
static IntLongHashMap |
newWithKeysValues(int key1,
long value1,
int key2,
long value2,
int key3,
long value3) |
|
static IntLongHashMap |
newWithKeysValues(int key1,
long value1,
int key2,
long value2,
int key3,
long value3,
int key4,
long value4) |
|
void |
put(int key,
long value) |
|
void |
putAll(IntLongMap map) |
|
void |
readExternal(ObjectInput in) |
|
IntLongHashMap |
reject(IntLongPredicate predicate) |
|
void |
remove(int key) |
|
void |
removeKey(int key) |
|
long |
removeKeyIfAbsent(int key,
long value) |
|
IntLongHashMap |
select(IntLongPredicate predicate) |
|
ImmutableIntLongMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
long |
updateValue(int key,
long initialValueIfAbsent,
LongToLongFunction function) |
|
void |
updateValues(IntLongToLongFunction function) |
Updates the values in-place.
|
MutableLongCollection |
values() |
|
IntLongHashMap |
withKeysValues(int key1,
long value1,
int key2,
long value2) |
|
IntLongHashMap |
withKeysValues(int key1,
long value1,
int key2,
long value2,
int key3,
long value3) |
|
IntLongHashMap |
withKeysValues(int key1,
long value1,
int key2,
long value2,
int key3,
long value3,
int key4,
long value4) |
|
IntLongHashMap |
withKeyValue(int key1,
long value1) |
|
IntLongHashMap |
withoutAllKeys(IntIterable keys) |
|
IntLongHashMap |
withoutKey(int key) |
|
void |
writeExternal(ObjectOutput out) |
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListallSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArrayisEmpty, notEmpty, sizeallSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedListcontainsValue, forEachValue, tapputPair, withAllKeyValuescollect, reject, selectappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizepublic IntLongHashMap()
public IntLongHashMap(int initialCapacity)
public IntLongHashMap(IntLongMap map)
public static IntLongHashMap newWithKeysValues(int key1, long value1)
public static IntLongHashMap newWithKeysValues(int key1, long value1, int key2, long value2)
public static IntLongHashMap newWithKeysValues(int key1, long value1, int key2, long value2, int key3, long value3)
public static IntLongHashMap newWithKeysValues(int key1, long value1, int key2, long value2, int key3, long value3, int key4, long value4)
public boolean equals(Object obj)
IntLongMapMap.equals(Object).equals in interface IntLongMapequals in class Objectpublic int hashCode()
IntLongMapMap.hashCode().hashCode in interface IntLongMaphashCode in class Objectpublic 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 IntLongMaptoString 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 MutableIntKeysMapclear in interface MutableLongValuesMappublic void put(int key,
long value)
put in interface MutableIntLongMappublic void putAll(IntLongMap map)
putAll in interface MutableIntLongMappublic void updateValues(IntLongToLongFunction function)
MutableIntLongMapupdateValues in interface MutableIntLongMapfunction - that takes a key and its value and that returns a new value for this keypublic void removeKey(int key)
removeKey in interface MutableIntKeysMapremoveKey in interface MutableIntLongMappublic void remove(int key)
remove in interface MutableIntLongMappublic long removeKeyIfAbsent(int key,
long value)
removeKeyIfAbsent in interface MutableIntLongMappublic long getIfAbsentPut(int key,
long value)
getIfAbsentPut in interface MutableIntLongMappublic long getIfAbsentPut(int key,
LongFunction0 function)
getIfAbsentPut in interface MutableIntLongMappublic <P> long getIfAbsentPutWith(int key,
LongFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableIntLongMappublic long getIfAbsentPutWithKey(int key,
IntToLongFunction function)
getIfAbsentPutWithKey in interface MutableIntLongMappublic long addToValue(int key,
long toBeAdded)
addToValue in interface MutableIntLongMappublic long updateValue(int key,
long initialValueIfAbsent,
LongToLongFunction function)
updateValue in interface MutableIntLongMappublic IntLongHashMap withKeyValue(int key1, long value1)
withKeyValue in interface MutableIntLongMappublic IntLongHashMap withKeysValues(int key1, long value1, int key2, long value2)
public IntLongHashMap withKeysValues(int key1, long value1, int key2, long value2, int key3, long value3)
public IntLongHashMap withKeysValues(int key1, long value1, int key2, long value2, int key3, long value3, int key4, long value4)
public IntLongHashMap withoutKey(int key)
withoutKey in interface MutableIntLongMappublic IntLongHashMap withoutAllKeys(IntIterable keys)
withoutAllKeys in interface MutableIntLongMappublic MutableIntLongMap asUnmodifiable()
asUnmodifiable in interface MutableIntLongMappublic MutableIntLongMap asSynchronized()
asSynchronized in interface MutableIntLongMappublic ImmutableIntLongMap toImmutable()
toImmutable in interface IntLongMappublic long get(int key)
get in interface IntLongMappublic long getIfAbsent(int key,
long ifAbsent)
getIfAbsent in interface IntLongMappublic long getOrThrow(int key)
getOrThrow in interface IntLongMappublic boolean containsKey(int key)
containsKey in interface IntKeysMapcontainsKey in interface IntLongMappublic void forEachKey(IntProcedure procedure)
forEachKey in interface IntKeysMapforEachKey in interface IntLongMappublic void forEachKeyValue(IntLongProcedure procedure)
forEachKeyValue in interface IntLongMappublic LazyIntIterable keysView()
keysView in interface IntLongMappublic RichIterable<IntLongPair> keyValuesView()
keyValuesView in interface IntLongMappublic MutableLongIntMap flipUniqueValues()
IntLongMapflipUniqueValues in interface IntLongMapflipUniqueValues in interface MutableIntLongMappublic IntLongHashMap select(IntLongPredicate predicate)
select in interface IntLongMapselect in interface MutableIntLongMappublic IntLongHashMap reject(IntLongPredicate predicate)
reject in interface IntLongMapreject in interface MutableIntLongMappublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void compact()
public MutableIntSet keySet()
keySet in interface IntLongMappublic MutableLongCollection values()
values in interface LongValuesMapCopyright © 2004–2019. All rights reserved.