Class ShortLongHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractLongIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableLongValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.ShortLongHashMap
-
- All Implemented Interfaces:
Externalizable,Serializable,LongIterable,LongValuesMap,MutableLongValuesMap,MutableShortLongMap,ShortLongMap,PrimitiveIterable,MutableShortKeysMap,ShortKeysMap
public class ShortLongHashMap extends AbstractMutableLongValuesMap implements MutableShortLongMap, Externalizable, MutableShortKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ShortLongHashMap()ShortLongHashMap(int initialCapacity)ShortLongHashMap(ShortLongMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longaddToValue(short key, long toBeAdded)MutableShortLongMapasSynchronized()MutableShortLongMapasUnmodifiable()voidclear()voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontainsKey(short key)booleanequals(Object obj)MutableLongShortMapflipUniqueValues()voidforEachKey(ShortProcedure procedure)voidforEachKeyValue(ShortLongProcedure procedure)longget(short key)longgetAndPut(short key, long putValue, long defaultValue)longgetIfAbsent(short key, long ifAbsent)longgetIfAbsentPut(short key, long value)longgetIfAbsentPut(short key, LongFunction0 function)<P> longgetIfAbsentPutWith(short key, LongFunction<? super P> function, P parameter)longgetIfAbsentPutWithKey(short key, ShortToLongFunction function)longgetOrThrow(short key)inthashCode()<V> VinjectInto(V injectedValue, ObjectLongToObjectFunction<? super V,? extends V> function)MutableShortSetkeySet()LazyShortIterablekeysView()RichIterable<ShortLongPair>keyValuesView()MutableLongIteratorlongIterator()static ShortLongHashMapnewWithKeysValues(short key1, long value1)static ShortLongHashMapnewWithKeysValues(short key1, long value1, short key2, long value2)static ShortLongHashMapnewWithKeysValues(short key1, long value1, short key2, long value2, short key3, long value3)static ShortLongHashMapnewWithKeysValues(short key1, long value1, short key2, long value2, short key3, long value3, short key4, long value4)voidput(short key, long value)voidputAll(ShortLongMap map)voidreadExternal(ObjectInput in)ShortLongHashMapreject(ShortLongPredicate predicate)voidremove(short key)voidremoveKey(short key)longremoveKeyIfAbsent(short key, long value)ShortLongHashMapselect(ShortLongPredicate predicate)ImmutableShortLongMaptoImmutable()StringtoString()booleantrimToSize()longupdateValue(short key, long initialValueIfAbsent, LongToLongFunction function)voidupdateValues(ShortLongToLongFunction function)MutableLongCollectionvalues()ShortLongHashMapwithKeysValues(short key1, long value1, short key2, long value2)ShortLongHashMapwithKeysValues(short key1, long value1, short key2, long value2, short key3, long value3)ShortLongHashMapwithKeysValues(short key1, long value1, short key2, long value2, short key3, long value3, short key4, long value4)ShortLongHashMapwithKeyValue(short key1, long value1)ShortLongHashMapwithoutAllKeys(ShortIterable keys)ShortLongHashMapwithoutKey(short 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.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.MutableLongValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortLongMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.ShortKeysMap
isEmpty, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ShortLongMap
injectIntoKeyValue
-
-
-
-
Constructor Detail
-
ShortLongHashMap
public ShortLongHashMap()
-
ShortLongHashMap
public ShortLongHashMap(int initialCapacity)
-
ShortLongHashMap
public ShortLongHashMap(ShortLongMap map)
-
-
Method Detail
-
newWithKeysValues
public static ShortLongHashMap newWithKeysValues(short key1, long value1)
-
newWithKeysValues
public static ShortLongHashMap newWithKeysValues(short key1, long value1, short key2, long value2)
-
newWithKeysValues
public static ShortLongHashMap newWithKeysValues(short key1, long value1, short key2, long value2, short key3, long value3)
-
newWithKeysValues
public static ShortLongHashMap newWithKeysValues(short key1, long value1, short key2, long value2, short key3, long value3, short key4, long value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceShortLongMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceShortLongMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfacePrimitiveIterable- Specified by:
toStringin interfaceShortLongMap- 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 interfaceMutableLongValuesMap- Specified by:
clearin interfaceMutableShortKeysMap
-
put
public void put(short key, long value)- Specified by:
putin interfaceMutableShortLongMap
-
putAll
public void putAll(ShortLongMap map)
- Specified by:
putAllin interfaceMutableShortLongMap
-
updateValues
public void updateValues(ShortLongToLongFunction function)
- Specified by:
updateValuesin interfaceMutableShortLongMap
-
removeKey
public void removeKey(short key)
- Specified by:
removeKeyin interfaceMutableShortKeysMap- Specified by:
removeKeyin interfaceMutableShortLongMap
-
remove
public void remove(short key)
- Specified by:
removein interfaceMutableShortLongMap
-
removeKeyIfAbsent
public long removeKeyIfAbsent(short key, long value)- Specified by:
removeKeyIfAbsentin interfaceMutableShortLongMap
-
getIfAbsentPut
public long getIfAbsentPut(short key, long value)- Specified by:
getIfAbsentPutin interfaceMutableShortLongMap
-
getAndPut
public long getAndPut(short key, long putValue, long defaultValue)- Specified by:
getAndPutin interfaceMutableShortLongMap
-
getIfAbsentPut
public long getIfAbsentPut(short key, LongFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableShortLongMap
-
getIfAbsentPutWith
public <P> long getIfAbsentPutWith(short key, LongFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableShortLongMap
-
getIfAbsentPutWithKey
public long getIfAbsentPutWithKey(short key, ShortToLongFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableShortLongMap
-
addToValue
public long addToValue(short key, long toBeAdded)- Specified by:
addToValuein interfaceMutableShortLongMap
-
updateValue
public long updateValue(short key, long initialValueIfAbsent, LongToLongFunction function)- Specified by:
updateValuein interfaceMutableShortLongMap
-
withKeyValue
public ShortLongHashMap withKeyValue(short key1, long value1)
- Specified by:
withKeyValuein interfaceMutableShortLongMap
-
withKeysValues
public ShortLongHashMap withKeysValues(short key1, long value1, short key2, long value2)
-
withKeysValues
public ShortLongHashMap withKeysValues(short key1, long value1, short key2, long value2, short key3, long value3)
-
withKeysValues
public ShortLongHashMap withKeysValues(short key1, long value1, short key2, long value2, short key3, long value3, short key4, long value4)
-
withoutKey
public ShortLongHashMap withoutKey(short key)
- Specified by:
withoutKeyin interfaceMutableShortLongMap
-
withoutAllKeys
public ShortLongHashMap withoutAllKeys(ShortIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableShortLongMap
-
asUnmodifiable
public MutableShortLongMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableShortLongMap
-
asSynchronized
public MutableShortLongMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableShortLongMap
-
toImmutable
public ImmutableShortLongMap toImmutable()
- Specified by:
toImmutablein interfaceShortLongMap
-
get
public long get(short key)
- Specified by:
getin interfaceShortLongMap
-
getIfAbsent
public long getIfAbsent(short key, long ifAbsent)- Specified by:
getIfAbsentin interfaceShortLongMap
-
getOrThrow
public long getOrThrow(short key)
- Specified by:
getOrThrowin interfaceShortLongMap
-
containsKey
public boolean containsKey(short key)
- Specified by:
containsKeyin interfaceShortKeysMap- Specified by:
containsKeyin interfaceShortLongMap
-
forEachKey
public void forEachKey(ShortProcedure procedure)
- Specified by:
forEachKeyin interfaceShortKeysMap- Specified by:
forEachKeyin interfaceShortLongMap
-
forEachKeyValue
public void forEachKeyValue(ShortLongProcedure procedure)
- Specified by:
forEachKeyValuein interfaceShortLongMap
-
keysView
public LazyShortIterable keysView()
- Specified by:
keysViewin interfaceShortLongMap
-
keyValuesView
public RichIterable<ShortLongPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceShortLongMap
-
flipUniqueValues
public MutableLongShortMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceMutableShortLongMap- Specified by:
flipUniqueValuesin interfaceShortLongMap
-
select
public ShortLongHashMap select(ShortLongPredicate predicate)
- Specified by:
selectin interfaceMutableShortLongMap- Specified by:
selectin interfaceShortLongMap
-
reject
public ShortLongHashMap reject(ShortLongPredicate predicate)
- Specified by:
rejectin interfaceMutableShortLongMap- Specified by:
rejectin interfaceShortLongMap
-
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 MutableShortSet keySet()
- Specified by:
keySetin interfaceShortLongMap
-
values
public MutableLongCollection values()
- Specified by:
valuesin interfaceLongValuesMap
-
-