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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LongIntHashMap()LongIntHashMap(int initialCapacity)LongIntHashMap(LongIntMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intaddToValue(long key, int toBeAdded)MutableLongIntMapasSynchronized()MutableLongIntMapasUnmodifiable()voidclear()voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontainsKey(long key)booleanequals(Object obj)MutableIntLongMapflipUniqueValues()voidforEachKey(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)MutableIntIteratorintIterator()MutableLongSetkeySet()LazyLongIterablekeysView()RichIterable<LongIntPair>keyValuesView()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)voidreadExternal(ObjectInput in)LongIntHashMapreject(LongIntPredicate predicate)voidremove(long key)voidremoveKey(long key)intremoveKeyIfAbsent(long key, int value)LongIntHashMapselect(LongIntPredicate predicate)ImmutableLongIntMaptoImmutable()StringtoString()booleantrimToSize()intupdateValue(long key, int initialValueIfAbsent, IntToIntFunction function)voidupdateValues(LongIntToIntFunction function)MutableIntCollectionvalues()LongIntHashMapwithKeysValues(long key1, int value1, long key2, int value2)LongIntHashMapwithKeysValues(long key1, int value1, long key2, int value2, long key3, int value3)LongIntHashMapwithKeysValues(long key1, int value1, long key2, int value2, long key3, int value3, long key4, int value4)LongIntHashMapwithKeyValue(long key1, int value1)LongIntHashMapwithoutAllKeys(LongIterable keys)LongIntHashMapwithoutKey(long key)voidwriteExternal(ObjectOutput out)-
Methods 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, toArray
-
Methods inherited from class org.eclipse.collections.impl.primitive.AbstractIntIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
-
Methods 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, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.IntValuesMap
containsValue, forEachValue, tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.LongIntMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.LongKeysMap
isEmpty, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableLongIntMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
-
-
-
Constructor Detail
-
LongIntHashMap
public LongIntHashMap()
-
LongIntHashMap
public LongIntHashMap(int initialCapacity)
-
LongIntHashMap
public LongIntHashMap(LongIntMap map)
-
-
Method Detail
-
newWithKeysValues
public static LongIntHashMap newWithKeysValues(long key1, int value1)
-
newWithKeysValues
public static LongIntHashMap newWithKeysValues(long key1, int value1, long key2, int value2)
-
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
public boolean equals(Object obj)
- Specified by:
equalsin interfaceLongIntMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceLongIntMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfaceLongIntMap- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classAbstractIntIterable
-
intIterator
public MutableIntIterator intIterator()
- Specified by:
intIteratorin interfaceIntIterable- Specified by:
intIteratorin interfaceMutableIntValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)- 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
public void putAll(LongIntMap map)
- Specified by:
putAllin interfaceMutableLongIntMap
-
updateValues
public void updateValues(LongIntToIntFunction function)
- 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
public int getIfAbsentPut(long key, IntFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableLongIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(long key, IntFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableLongIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(long key, LongToIntFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableLongIntMap
-
addToValue
public int addToValue(long key, int toBeAdded)- Specified by:
addToValuein interfaceMutableLongIntMap
-
updateValue
public int updateValue(long key, int initialValueIfAbsent, IntToIntFunction function)- Specified by:
updateValuein interfaceMutableLongIntMap
-
withKeyValue
public LongIntHashMap withKeyValue(long key1, int value1)
- Specified by:
withKeyValuein interfaceMutableLongIntMap
-
withKeysValues
public LongIntHashMap withKeysValues(long key1, int value1, long key2, int value2)
-
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
public LongIntHashMap withoutKey(long key)
- Specified by:
withoutKeyin interfaceMutableLongIntMap
-
withoutAllKeys
public LongIntHashMap withoutAllKeys(LongIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableLongIntMap
-
asUnmodifiable
public MutableLongIntMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableLongIntMap
-
asSynchronized
public MutableLongIntMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableLongIntMap
-
toImmutable
public ImmutableLongIntMap 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
public void forEachKey(LongProcedure procedure)
- Specified by:
forEachKeyin interfaceLongIntMap- Specified by:
forEachKeyin interfaceLongKeysMap
-
forEachKeyValue
public void forEachKeyValue(LongIntProcedure procedure)
- Specified by:
forEachKeyValuein interfaceLongIntMap
-
keysView
public LazyLongIterable keysView()
- Specified by:
keysViewin interfaceLongIntMap
-
keyValuesView
public RichIterable<LongIntPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceLongIntMap
-
flipUniqueValues
public MutableIntLongMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceLongIntMap- Specified by:
flipUniqueValuesin interfaceMutableLongIntMap
-
select
public LongIntHashMap select(LongIntPredicate predicate)
- Specified by:
selectin interfaceLongIntMap- Specified by:
selectin interfaceMutableLongIntMap
-
reject
public LongIntHashMap reject(LongIntPredicate predicate)
- Specified by:
rejectin interfaceLongIntMap- Specified by:
rejectin interfaceMutableLongIntMap
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
trimToSize
public boolean trimToSize()
- Since:
- 12.0
-
compact
@Deprecated public void 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
public MutableLongSet keySet()
- Specified by:
keySetin interfaceLongIntMap
-
values
public MutableIntCollection values()
- Specified by:
valuesin interfaceIntValuesMap
-
-