Externalizable, Serializable, IntIterable, IntValuesMap, LongIntMap, MutableIntValuesMap, MutableLongIntMap, PrimitiveIterable, MutableLongKeysMap, LongKeysMappublic class LongIntHashMap extends AbstractMutableIntValuesMap implements MutableLongIntMap, Externalizable, MutableLongKeysMap
| Constructor | Description |
|---|---|
LongIntHashMap() |
|
LongIntHashMap(int initialCapacity) |
|
LongIntHashMap(LongIntMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
addToValue(long key,
int toBeAdded) |
|
MutableLongIntMap |
asSynchronized() |
|
MutableLongIntMap |
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(Object obj) |
Follows the same general contract as
Map.equals(Object). |
void |
forEachKey(LongProcedure procedure) |
|
void |
forEachKeyValue(LongIntProcedure procedure) |
|
int |
get(long key) |
|
int |
getIfAbsent(long key,
int ifAbsent) |
|
int |
getIfAbsentPut(long key,
int value) |
|
int |
getIfAbsentPut(long key,
IntFunction0 function) |
|
<P> int |
getIfAbsentPutWith(long key,
IntFunction<? super P> function,
P parameter) |
|
int |
getIfAbsentPutWithKey(long key,
LongToIntFunction function) |
|
int |
getOrThrow(long key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
ObjectIntToObjectFunction<? super V,? extends V> function) |
|
MutableIntIterator |
intIterator() |
Returns a primitive iterator that can be used to iterate over the IntIterable in an
imperative style.
|
MutableLongSet |
keySet() |
|
LazyLongIterable |
keysView() |
|
RichIterable<LongIntPair> |
keyValuesView() |
|
static LongIntHashMap |
newWithKeysValues(long key1,
int value1) |
|
static LongIntHashMap |
newWithKeysValues(long key1,
int value1,
long key2,
int value2) |
|
static LongIntHashMap |
newWithKeysValues(long key1,
int value1,
long key2,
int value2,
long key3,
int value3) |
|
static LongIntHashMap |
newWithKeysValues(long key1,
int value1,
long key2,
int value2,
long key3,
int value3,
long key4,
int value4) |
|
void |
put(long key,
int value) |
|
void |
putAll(LongIntMap map) |
|
void |
readExternal(ObjectInput in) |
|
LongIntHashMap |
reject(LongIntPredicate predicate) |
|
void |
remove(long key) |
|
void |
removeKey(long key) |
|
int |
removeKeyIfAbsent(long key,
int value) |
|
LongIntHashMap |
select(LongIntPredicate predicate) |
|
ImmutableLongIntMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
int |
updateValue(long key,
int initialValueIfAbsent,
IntToIntFunction function) |
|
MutableIntCollection |
values() |
|
LongIntHashMap |
withKeysValues(long key1,
int value1,
long key2,
int value2) |
|
LongIntHashMap |
withKeysValues(long key1,
int value1,
long key2,
int value2,
long key3,
int value3) |
|
LongIntHashMap |
withKeysValues(long key1,
int value1,
long key2,
int value2,
long key3,
int value3,
long key4,
int value4) |
|
LongIntHashMap |
withKeyValue(long key1,
int value1) |
|
LongIntHashMap |
withoutAllKeys(LongIterable keys) |
|
LongIntHashMap |
withoutKey(long key) |
|
void |
writeExternal(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, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedListcontainsValue, forEachValueisEmpty, notEmpty, sizecollect, reject, selectappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizepublic LongIntHashMap()
public LongIntHashMap(int initialCapacity)
public LongIntHashMap(LongIntMap map)
public static LongIntHashMap newWithKeysValues(long key1, int value1)
public static LongIntHashMap newWithKeysValues(long key1, int value1, long key2, int value2)
public static LongIntHashMap newWithKeysValues(long key1, int value1, long key2, int value2, long key3, int value3)
public static LongIntHashMap newWithKeysValues(long key1, int value1, long key2, int value2, long key3, int value3, long key4, int value4)
public boolean equals(Object obj)
LongIntMapMap.equals(Object).equals in interface LongIntMapequals in class Objectpublic int hashCode()
LongIntMapMap.hashCode().hashCode in interface LongIntMaphashCode 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 LongIntMaptoString in interface PrimitiveIterabletoString in class AbstractIntIterableAbstractCollection.toString()public MutableIntIterator intIterator()
IntIterableintIterator in interface IntIterableintIterator in interface MutableIntValuesMappublic <V> V injectInto(V injectedValue,
ObjectIntToObjectFunction<? super V,? extends V> function)
injectInto in interface IntIterablepublic void clear()
clear in interface MutableIntValuesMapclear in interface MutableLongKeysMappublic void put(long key,
int value)
put in interface MutableLongIntMappublic void putAll(LongIntMap map)
putAll in interface MutableLongIntMappublic void removeKey(long key)
removeKey in interface MutableLongIntMapremoveKey in interface MutableLongKeysMappublic void remove(long key)
remove in interface MutableLongIntMappublic int removeKeyIfAbsent(long key,
int value)
removeKeyIfAbsent in interface MutableLongIntMappublic int getIfAbsentPut(long key,
int value)
getIfAbsentPut in interface MutableLongIntMappublic int getIfAbsentPut(long key,
IntFunction0 function)
getIfAbsentPut in interface MutableLongIntMappublic <P> int getIfAbsentPutWith(long key,
IntFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableLongIntMappublic int getIfAbsentPutWithKey(long key,
LongToIntFunction function)
getIfAbsentPutWithKey in interface MutableLongIntMappublic int addToValue(long key,
int toBeAdded)
addToValue in interface MutableLongIntMappublic int updateValue(long key,
int initialValueIfAbsent,
IntToIntFunction function)
updateValue in interface MutableLongIntMappublic LongIntHashMap withKeyValue(long key1, int value1)
withKeyValue in interface MutableLongIntMappublic LongIntHashMap withKeysValues(long key1, int value1, long key2, int value2)
public LongIntHashMap withKeysValues(long key1, int value1, long key2, int value2, long key3, int value3)
public LongIntHashMap withKeysValues(long key1, int value1, long key2, int value2, long key3, int value3, long key4, int value4)
public LongIntHashMap withoutKey(long key)
withoutKey in interface MutableLongIntMappublic LongIntHashMap withoutAllKeys(LongIterable keys)
withoutAllKeys in interface MutableLongIntMappublic MutableLongIntMap asUnmodifiable()
asUnmodifiable in interface MutableLongIntMappublic MutableLongIntMap asSynchronized()
asSynchronized in interface MutableLongIntMappublic ImmutableLongIntMap toImmutable()
toImmutable in interface LongIntMappublic int get(long key)
get in interface LongIntMappublic int getIfAbsent(long key,
int ifAbsent)
getIfAbsent in interface LongIntMappublic int getOrThrow(long key)
getOrThrow in interface LongIntMappublic boolean containsKey(long key)
containsKey in interface LongIntMapcontainsKey in interface LongKeysMappublic void forEachKey(LongProcedure procedure)
forEachKey in interface LongIntMapforEachKey in interface LongKeysMappublic void forEachKeyValue(LongIntProcedure procedure)
forEachKeyValue in interface LongIntMappublic LazyLongIterable keysView()
keysView in interface LongIntMappublic RichIterable<LongIntPair> keyValuesView()
keyValuesView in interface LongIntMappublic LongIntHashMap select(LongIntPredicate predicate)
select in interface LongIntMapselect in interface MutableLongIntMappublic LongIntHashMap reject(LongIntPredicate predicate)
reject in interface LongIntMapreject in interface MutableLongIntMappublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void compact()
public MutableLongSet keySet()
keySet in interface LongIntMappublic MutableIntCollection values()
values in interface IntValuesMapCopyright © 2004–2017. All rights reserved.