Class LongShortHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractShortIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableShortValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.LongShortHashMap
-
- All Implemented Interfaces:
Externalizable,Serializable,LongShortMap,MutableLongShortMap,MutableShortValuesMap,ShortValuesMap,PrimitiveIterable,ShortIterable,MutableLongKeysMap,LongKeysMap
public class LongShortHashMap extends AbstractMutableShortValuesMap implements MutableLongShortMap, Externalizable, MutableLongKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LongShortHashMap()LongShortHashMap(int initialCapacity)LongShortHashMap(LongShortMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description shortaddToValue(long key, short toBeAdded)MutableLongShortMapasSynchronized()MutableLongShortMapasUnmodifiable()voidclear()voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontainsKey(long key)booleanequals(Object obj)MutableShortLongMapflipUniqueValues()voidforEachKey(LongProcedure procedure)voidforEachKeyValue(LongShortProcedure procedure)shortget(long key)shortgetAndPut(long key, short putValue, short defaultValue)shortgetIfAbsent(long key, short ifAbsent)shortgetIfAbsentPut(long key, short value)shortgetIfAbsentPut(long key, ShortFunction0 function)<P> shortgetIfAbsentPutWith(long key, ShortFunction<? super P> function, P parameter)shortgetIfAbsentPutWithKey(long key, LongToShortFunction function)shortgetOrThrow(long key)inthashCode()<V> VinjectInto(V injectedValue, ObjectShortToObjectFunction<? super V,? extends V> function)MutableLongSetkeySet()LazyLongIterablekeysView()RichIterable<LongShortPair>keyValuesView()static LongShortHashMapnewWithKeysValues(long key1, short value1)static LongShortHashMapnewWithKeysValues(long key1, short value1, long key2, short value2)static LongShortHashMapnewWithKeysValues(long key1, short value1, long key2, short value2, long key3, short value3)static LongShortHashMapnewWithKeysValues(long key1, short value1, long key2, short value2, long key3, short value3, long key4, short value4)voidput(long key, short value)voidputAll(LongShortMap map)voidreadExternal(ObjectInput in)LongShortHashMapreject(LongShortPredicate predicate)voidremove(long key)voidremoveKey(long key)shortremoveKeyIfAbsent(long key, short value)LongShortHashMapselect(LongShortPredicate predicate)MutableShortIteratorshortIterator()ImmutableLongShortMaptoImmutable()StringtoString()booleantrimToSize()shortupdateValue(long key, short initialValueIfAbsent, ShortToShortFunction function)voidupdateValues(LongShortToShortFunction function)MutableShortCollectionvalues()LongShortHashMapwithKeysValues(long key1, short value1, long key2, short value2)LongShortHashMapwithKeysValues(long key1, short value1, long key2, short value2, long key3, short value3)LongShortHashMapwithKeysValues(long key1, short value1, long key2, short value2, long key3, short value3, long key4, short value4)LongShortHashMapwithKeyValue(long key1, short value1)LongShortHashMapwithoutAllKeys(LongIterable keys)LongShortHashMapwithoutKey(long key)voidwriteExternal(ObjectOutput out)-
Methods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableShortValuesMap
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.AbstractShortIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.LongKeysMap
isEmpty, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.LongShortMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableLongShortMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortValuesMap
collect, reject, select
-
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.api.ShortIterable
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.ShortValuesMap
containsValue, forEachValue, tap
-
-
-
-
Constructor Detail
-
LongShortHashMap
public LongShortHashMap()
-
LongShortHashMap
public LongShortHashMap(int initialCapacity)
-
LongShortHashMap
public LongShortHashMap(LongShortMap map)
-
-
Method Detail
-
newWithKeysValues
public static LongShortHashMap newWithKeysValues(long key1, short value1)
-
newWithKeysValues
public static LongShortHashMap newWithKeysValues(long key1, short value1, long key2, short value2)
-
newWithKeysValues
public static LongShortHashMap newWithKeysValues(long key1, short value1, long key2, short value2, long key3, short value3)
-
newWithKeysValues
public static LongShortHashMap newWithKeysValues(long key1, short value1, long key2, short value2, long key3, short value3, long key4, short value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceLongShortMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceLongShortMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfaceLongShortMap- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classAbstractShortIterable
-
shortIterator
public MutableShortIterator shortIterator()
- Specified by:
shortIteratorin interfaceMutableShortValuesMap- Specified by:
shortIteratorin interfaceShortIterable
-
injectInto
public <V> V injectInto(V injectedValue, ObjectShortToObjectFunction<? super V,? extends V> function)- Specified by:
injectIntoin interfaceShortIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableLongKeysMap- Specified by:
clearin interfaceMutableShortValuesMap
-
put
public void put(long key, short value)- Specified by:
putin interfaceMutableLongShortMap
-
putAll
public void putAll(LongShortMap map)
- Specified by:
putAllin interfaceMutableLongShortMap
-
updateValues
public void updateValues(LongShortToShortFunction function)
- Specified by:
updateValuesin interfaceMutableLongShortMap
-
removeKey
public void removeKey(long key)
- Specified by:
removeKeyin interfaceMutableLongKeysMap- Specified by:
removeKeyin interfaceMutableLongShortMap
-
remove
public void remove(long key)
- Specified by:
removein interfaceMutableLongShortMap
-
removeKeyIfAbsent
public short removeKeyIfAbsent(long key, short value)- Specified by:
removeKeyIfAbsentin interfaceMutableLongShortMap
-
getIfAbsentPut
public short getIfAbsentPut(long key, short value)- Specified by:
getIfAbsentPutin interfaceMutableLongShortMap
-
getAndPut
public short getAndPut(long key, short putValue, short defaultValue)- Specified by:
getAndPutin interfaceMutableLongShortMap
-
getIfAbsentPut
public short getIfAbsentPut(long key, ShortFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableLongShortMap
-
getIfAbsentPutWith
public <P> short getIfAbsentPutWith(long key, ShortFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableLongShortMap
-
getIfAbsentPutWithKey
public short getIfAbsentPutWithKey(long key, LongToShortFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableLongShortMap
-
addToValue
public short addToValue(long key, short toBeAdded)- Specified by:
addToValuein interfaceMutableLongShortMap
-
updateValue
public short updateValue(long key, short initialValueIfAbsent, ShortToShortFunction function)- Specified by:
updateValuein interfaceMutableLongShortMap
-
withKeyValue
public LongShortHashMap withKeyValue(long key1, short value1)
- Specified by:
withKeyValuein interfaceMutableLongShortMap
-
withKeysValues
public LongShortHashMap withKeysValues(long key1, short value1, long key2, short value2)
-
withKeysValues
public LongShortHashMap withKeysValues(long key1, short value1, long key2, short value2, long key3, short value3)
-
withKeysValues
public LongShortHashMap withKeysValues(long key1, short value1, long key2, short value2, long key3, short value3, long key4, short value4)
-
withoutKey
public LongShortHashMap withoutKey(long key)
- Specified by:
withoutKeyin interfaceMutableLongShortMap
-
withoutAllKeys
public LongShortHashMap withoutAllKeys(LongIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableLongShortMap
-
asUnmodifiable
public MutableLongShortMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableLongShortMap
-
asSynchronized
public MutableLongShortMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableLongShortMap
-
toImmutable
public ImmutableLongShortMap toImmutable()
- Specified by:
toImmutablein interfaceLongShortMap
-
get
public short get(long key)
- Specified by:
getin interfaceLongShortMap
-
getIfAbsent
public short getIfAbsent(long key, short ifAbsent)- Specified by:
getIfAbsentin interfaceLongShortMap
-
getOrThrow
public short getOrThrow(long key)
- Specified by:
getOrThrowin interfaceLongShortMap
-
containsKey
public boolean containsKey(long key)
- Specified by:
containsKeyin interfaceLongKeysMap- Specified by:
containsKeyin interfaceLongShortMap
-
forEachKey
public void forEachKey(LongProcedure procedure)
- Specified by:
forEachKeyin interfaceLongKeysMap- Specified by:
forEachKeyin interfaceLongShortMap
-
forEachKeyValue
public void forEachKeyValue(LongShortProcedure procedure)
- Specified by:
forEachKeyValuein interfaceLongShortMap
-
keysView
public LazyLongIterable keysView()
- Specified by:
keysViewin interfaceLongShortMap
-
keyValuesView
public RichIterable<LongShortPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceLongShortMap
-
flipUniqueValues
public MutableShortLongMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceLongShortMap- Specified by:
flipUniqueValuesin interfaceMutableLongShortMap
-
select
public LongShortHashMap select(LongShortPredicate predicate)
- Specified by:
selectin interfaceLongShortMap- Specified by:
selectin interfaceMutableLongShortMap
-
reject
public LongShortHashMap reject(LongShortPredicate predicate)
- Specified by:
rejectin interfaceLongShortMap- Specified by:
rejectin interfaceMutableLongShortMap
-
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 interfaceLongShortMap
-
values
public MutableShortCollection values()
- Specified by:
valuesin interfaceShortValuesMap
-
-