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 int
addToValue(long key, int toBeAdded)
MutableLongIntMap
asSynchronized()
MutableLongIntMap
asUnmodifiable()
void
clear()
void
compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadboolean
containsKey(long key)
boolean
equals(Object obj)
MutableIntLongMap
flipUniqueValues()
void
forEachKey(LongProcedure procedure)
void
forEachKeyValue(LongIntProcedure procedure)
int
get(long key)
int
getAndPut(long key, int putValue, int defaultValue)
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()
<V> V
injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)
MutableIntIterator
intIterator()
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()
boolean
trimToSize()
int
updateValue(long key, int initialValueIfAbsent, IntToIntFunction function)
void
updateValues(LongIntToIntFunction 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)
-
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:
equals
in interfaceLongIntMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceLongIntMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceLongIntMap
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classAbstractIntIterable
-
intIterator
public MutableIntIterator intIterator()
- Specified by:
intIterator
in interfaceIntIterable
- Specified by:
intIterator
in interfaceMutableIntValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)
- Specified by:
injectInto
in interfaceIntIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableIntValuesMap
- Specified by:
clear
in interfaceMutableLongKeysMap
-
put
public void put(long key, int value)
- Specified by:
put
in interfaceMutableLongIntMap
-
putAll
public void putAll(LongIntMap map)
- Specified by:
putAll
in interfaceMutableLongIntMap
-
updateValues
public void updateValues(LongIntToIntFunction function)
- Specified by:
updateValues
in interfaceMutableLongIntMap
-
removeKey
public void removeKey(long key)
- Specified by:
removeKey
in interfaceMutableLongIntMap
- Specified by:
removeKey
in interfaceMutableLongKeysMap
-
remove
public void remove(long key)
- Specified by:
remove
in interfaceMutableLongIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(long key, int value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableLongIntMap
-
getIfAbsentPut
public int getIfAbsentPut(long key, int value)
- Specified by:
getIfAbsentPut
in interfaceMutableLongIntMap
-
getAndPut
public int getAndPut(long key, int putValue, int defaultValue)
- Specified by:
getAndPut
in interfaceMutableLongIntMap
-
getIfAbsentPut
public int getIfAbsentPut(long key, IntFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableLongIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(long key, IntFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableLongIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(long key, LongToIntFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableLongIntMap
-
addToValue
public int addToValue(long key, int toBeAdded)
- Specified by:
addToValue
in interfaceMutableLongIntMap
-
updateValue
public int updateValue(long key, int initialValueIfAbsent, IntToIntFunction function)
- Specified by:
updateValue
in interfaceMutableLongIntMap
-
withKeyValue
public LongIntHashMap withKeyValue(long key1, int value1)
- Specified by:
withKeyValue
in 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:
withoutKey
in interfaceMutableLongIntMap
-
withoutAllKeys
public LongIntHashMap withoutAllKeys(LongIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableLongIntMap
-
asUnmodifiable
public MutableLongIntMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableLongIntMap
-
asSynchronized
public MutableLongIntMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableLongIntMap
-
toImmutable
public ImmutableLongIntMap toImmutable()
- Specified by:
toImmutable
in interfaceLongIntMap
-
get
public int get(long key)
- Specified by:
get
in interfaceLongIntMap
-
getIfAbsent
public int getIfAbsent(long key, int ifAbsent)
- Specified by:
getIfAbsent
in interfaceLongIntMap
-
getOrThrow
public int getOrThrow(long key)
- Specified by:
getOrThrow
in interfaceLongIntMap
-
containsKey
public boolean containsKey(long key)
- Specified by:
containsKey
in interfaceLongIntMap
- Specified by:
containsKey
in interfaceLongKeysMap
-
forEachKey
public void forEachKey(LongProcedure procedure)
- Specified by:
forEachKey
in interfaceLongIntMap
- Specified by:
forEachKey
in interfaceLongKeysMap
-
forEachKeyValue
public void forEachKeyValue(LongIntProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceLongIntMap
-
keysView
public LazyLongIterable keysView()
- Specified by:
keysView
in interfaceLongIntMap
-
keyValuesView
public RichIterable<LongIntPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceLongIntMap
-
flipUniqueValues
public MutableIntLongMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceLongIntMap
- Specified by:
flipUniqueValues
in interfaceMutableLongIntMap
-
select
public LongIntHashMap select(LongIntPredicate predicate)
- Specified by:
select
in interfaceLongIntMap
- Specified by:
select
in interfaceMutableLongIntMap
-
reject
public LongIntHashMap reject(LongIntPredicate predicate)
- Specified by:
reject
in interfaceLongIntMap
- Specified by:
reject
in interfaceMutableLongIntMap
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
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:
keySet
in interfaceLongIntMap
-
values
public MutableIntCollection values()
- Specified by:
values
in interfaceIntValuesMap
-
-