Class IntLongHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractLongIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableLongValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.IntLongHashMap
-
- All Implemented Interfaces:
Externalizable,Serializable,LongIterable,IntLongMap,LongValuesMap,MutableIntLongMap,MutableLongValuesMap,PrimitiveIterable,MutableIntKeysMap,IntKeysMap
public class IntLongHashMap extends AbstractMutableLongValuesMap implements MutableIntLongMap, Externalizable, MutableIntKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IntLongHashMap()IntLongHashMap(int initialCapacity)IntLongHashMap(IntLongMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longaddToValue(int key, long toBeAdded)MutableIntLongMapasSynchronized()MutableIntLongMapasUnmodifiable()voidclear()voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontainsKey(int key)booleanequals(Object obj)MutableLongIntMapflipUniqueValues()voidforEachKey(IntProcedure procedure)voidforEachKeyValue(IntLongProcedure procedure)longget(int key)longgetAndPut(int key, long putValue, long defaultValue)longgetIfAbsent(int key, long ifAbsent)longgetIfAbsentPut(int key, long value)longgetIfAbsentPut(int key, LongFunction0 function)<P> longgetIfAbsentPutWith(int key, LongFunction<? super P> function, P parameter)longgetIfAbsentPutWithKey(int key, IntToLongFunction function)longgetOrThrow(int key)inthashCode()<V> VinjectInto(V injectedValue, ObjectLongToObjectFunction<? super V,? extends V> function)MutableIntSetkeySet()LazyIntIterablekeysView()RichIterable<IntLongPair>keyValuesView()MutableLongIteratorlongIterator()static IntLongHashMapnewWithKeysValues(int key1, long value1)static IntLongHashMapnewWithKeysValues(int key1, long value1, int key2, long value2)static IntLongHashMapnewWithKeysValues(int key1, long value1, int key2, long value2, int key3, long value3)static IntLongHashMapnewWithKeysValues(int key1, long value1, int key2, long value2, int key3, long value3, int key4, long value4)voidput(int key, long value)voidputAll(IntLongMap map)voidreadExternal(ObjectInput in)IntLongHashMapreject(IntLongPredicate predicate)voidremove(int key)voidremoveKey(int key)longremoveKeyIfAbsent(int key, long value)IntLongHashMapselect(IntLongPredicate predicate)ImmutableIntLongMaptoImmutable()StringtoString()booleantrimToSize()longupdateValue(int key, long initialValueIfAbsent, LongToLongFunction function)voidupdateValues(IntLongToLongFunction function)MutableLongCollectionvalues()IntLongHashMapwithKeysValues(int key1, long value1, int key2, long value2)IntLongHashMapwithKeysValues(int key1, long value1, int key2, long value2, int key3, long value3)IntLongHashMapwithKeysValues(int key1, long value1, int key2, long value2, int key3, long value3, int key4, long value4)IntLongHashMapwithKeyValue(int key1, long value1)IntLongHashMapwithoutAllKeys(IntIterable keys)IntLongHashMapwithoutKey(int key)voidwriteExternal(ObjectOutput out)-
Methods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableLongValuesMap
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.AbstractLongIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.IntKeysMap
isEmpty, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.IntLongMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.api.LongIterable
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.LongValuesMap
containsValue, forEachValue, tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntLongMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableLongValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
-
-
-
Constructor Detail
-
IntLongHashMap
public IntLongHashMap()
-
IntLongHashMap
public IntLongHashMap(int initialCapacity)
-
IntLongHashMap
public IntLongHashMap(IntLongMap map)
-
-
Method Detail
-
newWithKeysValues
public static IntLongHashMap newWithKeysValues(int key1, long value1)
-
newWithKeysValues
public static IntLongHashMap newWithKeysValues(int key1, long value1, int key2, long value2)
-
newWithKeysValues
public static IntLongHashMap newWithKeysValues(int key1, long value1, int key2, long value2, int key3, long value3)
-
newWithKeysValues
public static IntLongHashMap newWithKeysValues(int key1, long value1, int key2, long value2, int key3, long value3, int key4, long value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceIntLongMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceIntLongMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfaceIntLongMap- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classAbstractLongIterable
-
longIterator
public MutableLongIterator longIterator()
- Specified by:
longIteratorin interfaceLongIterable- Specified by:
longIteratorin interfaceMutableLongValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectLongToObjectFunction<? super V,? extends V> function)- Specified by:
injectIntoin interfaceLongIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableIntKeysMap- Specified by:
clearin interfaceMutableLongValuesMap
-
put
public void put(int key, long value)- Specified by:
putin interfaceMutableIntLongMap
-
putAll
public void putAll(IntLongMap map)
- Specified by:
putAllin interfaceMutableIntLongMap
-
updateValues
public void updateValues(IntLongToLongFunction function)
- Specified by:
updateValuesin interfaceMutableIntLongMap
-
removeKey
public void removeKey(int key)
- Specified by:
removeKeyin interfaceMutableIntKeysMap- Specified by:
removeKeyin interfaceMutableIntLongMap
-
remove
public void remove(int key)
- Specified by:
removein interfaceMutableIntLongMap
-
removeKeyIfAbsent
public long removeKeyIfAbsent(int key, long value)- Specified by:
removeKeyIfAbsentin interfaceMutableIntLongMap
-
getIfAbsentPut
public long getIfAbsentPut(int key, long value)- Specified by:
getIfAbsentPutin interfaceMutableIntLongMap
-
getAndPut
public long getAndPut(int key, long putValue, long defaultValue)- Specified by:
getAndPutin interfaceMutableIntLongMap
-
getIfAbsentPut
public long getIfAbsentPut(int key, LongFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableIntLongMap
-
getIfAbsentPutWith
public <P> long getIfAbsentPutWith(int key, LongFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableIntLongMap
-
getIfAbsentPutWithKey
public long getIfAbsentPutWithKey(int key, IntToLongFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableIntLongMap
-
addToValue
public long addToValue(int key, long toBeAdded)- Specified by:
addToValuein interfaceMutableIntLongMap
-
updateValue
public long updateValue(int key, long initialValueIfAbsent, LongToLongFunction function)- Specified by:
updateValuein interfaceMutableIntLongMap
-
withKeyValue
public IntLongHashMap withKeyValue(int key1, long value1)
- Specified by:
withKeyValuein interfaceMutableIntLongMap
-
withKeysValues
public IntLongHashMap withKeysValues(int key1, long value1, int key2, long value2)
-
withKeysValues
public IntLongHashMap withKeysValues(int key1, long value1, int key2, long value2, int key3, long value3)
-
withKeysValues
public IntLongHashMap withKeysValues(int key1, long value1, int key2, long value2, int key3, long value3, int key4, long value4)
-
withoutKey
public IntLongHashMap withoutKey(int key)
- Specified by:
withoutKeyin interfaceMutableIntLongMap
-
withoutAllKeys
public IntLongHashMap withoutAllKeys(IntIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableIntLongMap
-
asUnmodifiable
public MutableIntLongMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableIntLongMap
-
asSynchronized
public MutableIntLongMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableIntLongMap
-
toImmutable
public ImmutableIntLongMap toImmutable()
- Specified by:
toImmutablein interfaceIntLongMap
-
get
public long get(int key)
- Specified by:
getin interfaceIntLongMap
-
getIfAbsent
public long getIfAbsent(int key, long ifAbsent)- Specified by:
getIfAbsentin interfaceIntLongMap
-
getOrThrow
public long getOrThrow(int key)
- Specified by:
getOrThrowin interfaceIntLongMap
-
containsKey
public boolean containsKey(int key)
- Specified by:
containsKeyin interfaceIntKeysMap- Specified by:
containsKeyin interfaceIntLongMap
-
forEachKey
public void forEachKey(IntProcedure procedure)
- Specified by:
forEachKeyin interfaceIntKeysMap- Specified by:
forEachKeyin interfaceIntLongMap
-
forEachKeyValue
public void forEachKeyValue(IntLongProcedure procedure)
- Specified by:
forEachKeyValuein interfaceIntLongMap
-
keysView
public LazyIntIterable keysView()
- Specified by:
keysViewin interfaceIntLongMap
-
keyValuesView
public RichIterable<IntLongPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceIntLongMap
-
flipUniqueValues
public MutableLongIntMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceIntLongMap- Specified by:
flipUniqueValuesin interfaceMutableIntLongMap
-
select
public IntLongHashMap select(IntLongPredicate predicate)
- Specified by:
selectin interfaceIntLongMap- Specified by:
selectin interfaceMutableIntLongMap
-
reject
public IntLongHashMap reject(IntLongPredicate predicate)
- Specified by:
rejectin interfaceIntLongMap- Specified by:
rejectin interfaceMutableIntLongMap
-
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 MutableIntSet keySet()
- Specified by:
keySetin interfaceIntLongMap
-
values
public MutableLongCollection values()
- Specified by:
valuesin interfaceLongValuesMap
-
-