Class LongIntHashMap
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractIntIterable
org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableIntValuesMap
org.eclipse.collections.impl.map.mutable.primitive.LongIntHashMap
- All Implemented Interfaces:
Externalizable,Serializable,IntIterable,IntValuesMap,LongIntMap,MutableIntValuesMap,MutableLongIntMap,PrimitiveIterable,MutableLongKeysMap,LongKeysMap
public class LongIntHashMap
extends AbstractMutableIntValuesMap
implements MutableLongIntMap, Externalizable, MutableLongKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.
- Since:
- 3.0.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintaddToValue(long key, int toBeAdded) booleanallSatisfyKeyValue(LongIntPredicate predicate) voidclear()voidcompact()Deprecated.booleancontainsKey(long key) booleanvoidforEachKey(LongProcedure procedure) voidforEachKeyValue(LongIntProcedure procedure) intget(long key) intgetAndPut(long key, int putValue, int defaultValue) intgetIfAbsent(long key, int ifAbsent) intgetIfAbsentPut(long key, int value) intgetIfAbsentPut(long key, IntFunction0 function) <P> intgetIfAbsentPutWith(long key, IntFunction<? super P> function, P parameter) intgetIfAbsentPutWithKey(long key, LongToIntFunction function) intgetOrThrow(long key) inthashCode()<V> VinjectInto(V injectedValue, ObjectIntToObjectFunction<? super V, ? extends V> function) keySet()keysView()static LongIntHashMapnewWithKeysValues(long key1, int value1) static LongIntHashMapnewWithKeysValues(long key1, int value1, long key2, int value2) static LongIntHashMapnewWithKeysValues(long key1, int value1, long key2, int value2, long key3, int value3) static LongIntHashMapnewWithKeysValues(long key1, int value1, long key2, int value2, long key3, int value3, long key4, int value4) voidput(long key, int value) voidputAll(LongIntMap map) voidreject(LongIntPredicate predicate) voidremove(long key) voidremoveKey(long key) intremoveKeyIfAbsent(long key, int value) select(LongIntPredicate predicate) toString()booleanintupdateValue(long key, int initialValueIfAbsent, IntToIntFunction function) voidupdateValues(LongIntToIntFunction function) values()withKeysValues(long key1, int value1, long key2, int value2) withKeysValues(long key1, int value1, long key2, int value2, long key3, int value3) withKeysValues(long key1, int value1, long key2, int value2, long key3, int value3, long key4, int value4) withKeyValue(long key1, int value1) withoutAllKeys(LongIterable keys) withoutKey(long key) voidMethods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableIntValuesMap
allSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEachValue, isEmpty, max, min, notEmpty, reject, select, size, sum, toArray, toArrayMethods inherited from class org.eclipse.collections.impl.primitive.AbstractIntIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListMethods inherited from interface org.eclipse.collections.api.IntIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface org.eclipse.collections.api.map.primitive.IntValuesMap
containsValue, forEachValue, tapMethods inherited from interface org.eclipse.collections.api.map.primitive.LongIntMap
injectIntoKeyValueMethods inherited from interface org.eclipse.collections.impl.map.primitive.LongKeysMap
isEmpty, notEmpty, sizeMethods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntValuesMap
collect, reject, selectMethods inherited from interface org.eclipse.collections.api.map.primitive.MutableLongIntMap
putPair, withAllKeyValuesMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
Constructor Details
-
LongIntHashMap
public LongIntHashMap() -
LongIntHashMap
public LongIntHashMap(int initialCapacity) -
LongIntHashMap
-
-
Method Details
-
newWithKeysValues
-
newWithKeysValues
-
newWithKeysValues
public static LongIntHashMap newWithKeysValues(long key1, int value1, long key2, int value2, long key3, int value3) -
newWithKeysValues
public static LongIntHashMap newWithKeysValues(long key1, int value1, long key2, int value2, long key3, int value3, long key4, int value4) -
equals
- Specified by:
equalsin interfaceLongIntMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceLongIntMap- Overrides:
hashCodein classObject
-
toString
- Specified by:
toStringin interfaceLongIntMap- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classAbstractIntIterable
-
intIterator
- Specified by:
intIteratorin interfaceIntIterable- Specified by:
intIteratorin interfaceMutableIntValuesMap
-
injectInto
- Specified by:
injectIntoin interfaceIntIterable
-
clear
public void clear()- Specified by:
clearin interfaceMutableIntValuesMap- Specified by:
clearin interfaceMutableLongKeysMap
-
put
public void put(long key, int value) - Specified by:
putin interfaceMutableLongIntMap
-
putAll
- Specified by:
putAllin interfaceMutableLongIntMap
-
updateValues
- Specified by:
updateValuesin interfaceMutableLongIntMap
-
removeKey
public void removeKey(long key) - Specified by:
removeKeyin interfaceMutableLongIntMap- Specified by:
removeKeyin interfaceMutableLongKeysMap
-
remove
public void remove(long key) - Specified by:
removein interfaceMutableLongIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(long key, int value) - Specified by:
removeKeyIfAbsentin interfaceMutableLongIntMap
-
getIfAbsentPut
public int getIfAbsentPut(long key, int value) - Specified by:
getIfAbsentPutin interfaceMutableLongIntMap
-
getAndPut
public int getAndPut(long key, int putValue, int defaultValue) - Specified by:
getAndPutin interfaceMutableLongIntMap
-
getIfAbsentPut
- Specified by:
getIfAbsentPutin interfaceMutableLongIntMap
-
getIfAbsentPutWith
- Specified by:
getIfAbsentPutWithin interfaceMutableLongIntMap
-
getIfAbsentPutWithKey
- Specified by:
getIfAbsentPutWithKeyin interfaceMutableLongIntMap
-
addToValue
public int addToValue(long key, int toBeAdded) - Specified by:
addToValuein interfaceMutableLongIntMap
-
updateValue
- Specified by:
updateValuein interfaceMutableLongIntMap
-
withKeyValue
- Specified by:
withKeyValuein interfaceMutableLongIntMap
-
withKeysValues
-
withKeysValues
public LongIntHashMap withKeysValues(long key1, int value1, long key2, int value2, long key3, int value3) -
withKeysValues
public LongIntHashMap withKeysValues(long key1, int value1, long key2, int value2, long key3, int value3, long key4, int value4) -
withoutKey
- Specified by:
withoutKeyin interfaceMutableLongIntMap
-
withoutAllKeys
- Specified by:
withoutAllKeysin interfaceMutableLongIntMap
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableLongIntMap
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableLongIntMap
-
toImmutable
- Specified by:
toImmutablein interfaceLongIntMap
-
get
public int get(long key) - Specified by:
getin interfaceLongIntMap
-
getIfAbsent
public int getIfAbsent(long key, int ifAbsent) - Specified by:
getIfAbsentin interfaceLongIntMap
-
getOrThrow
public int getOrThrow(long key) - Specified by:
getOrThrowin interfaceLongIntMap
-
containsKey
public boolean containsKey(long key) - Specified by:
containsKeyin interfaceLongIntMap- Specified by:
containsKeyin interfaceLongKeysMap
-
forEachKey
- Specified by:
forEachKeyin interfaceLongIntMap- Specified by:
forEachKeyin interfaceLongKeysMap
-
forEachKeyValue
- Specified by:
forEachKeyValuein interfaceLongIntMap
-
allSatisfyKeyValue
- Specified by:
allSatisfyKeyValuein interfaceLongIntMap- Since:
- 12.0
-
keysView
- Specified by:
keysViewin interfaceLongIntMap
-
keyValuesView
- Specified by:
keyValuesViewin interfaceLongIntMap
-
flipUniqueValues
- Specified by:
flipUniqueValuesin interfaceLongIntMap- Specified by:
flipUniqueValuesin interfaceMutableLongIntMap
-
select
- Specified by:
selectin interfaceLongIntMap- Specified by:
selectin interfaceMutableLongIntMap
-
reject
- Specified by:
rejectin interfaceLongIntMap- Specified by:
rejectin interfaceMutableLongIntMap
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
trimToSize
public boolean trimToSize()- Since:
- 12.0
-
compact
Deprecated.since 12.0 - UsetrimToSize()insteadRehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels. -
keySet
- Specified by:
keySetin interfaceLongIntMap
-
values
- Specified by:
valuesin interfaceIntValuesMap
-
trimToSize()instead