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 short
addToValue(long key, short toBeAdded)
MutableLongShortMap
asSynchronized()
MutableLongShortMap
asUnmodifiable()
void
clear()
void
compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadboolean
containsKey(long key)
boolean
equals(Object obj)
MutableShortLongMap
flipUniqueValues()
void
forEachKey(LongProcedure procedure)
void
forEachKeyValue(LongShortProcedure procedure)
short
get(long key)
short
getAndPut(long key, short putValue, short defaultValue)
short
getIfAbsent(long key, short ifAbsent)
short
getIfAbsentPut(long key, short value)
short
getIfAbsentPut(long key, ShortFunction0 function)
<P> short
getIfAbsentPutWith(long key, ShortFunction<? super P> function, P parameter)
short
getIfAbsentPutWithKey(long key, LongToShortFunction function)
short
getOrThrow(long key)
int
hashCode()
<V> V
injectInto(V injectedValue, ObjectShortToObjectFunction<? super V,? extends V> function)
MutableLongSet
keySet()
LazyLongIterable
keysView()
RichIterable<LongShortPair>
keyValuesView()
static LongShortHashMap
newWithKeysValues(long key1, short value1)
static LongShortHashMap
newWithKeysValues(long key1, short value1, long key2, short value2)
static LongShortHashMap
newWithKeysValues(long key1, short value1, long key2, short value2, long key3, short value3)
static LongShortHashMap
newWithKeysValues(long key1, short value1, long key2, short value2, long key3, short value3, long key4, short value4)
void
put(long key, short value)
void
putAll(LongShortMap map)
void
readExternal(ObjectInput in)
LongShortHashMap
reject(LongShortPredicate predicate)
void
remove(long key)
void
removeKey(long key)
short
removeKeyIfAbsent(long key, short value)
LongShortHashMap
select(LongShortPredicate predicate)
MutableShortIterator
shortIterator()
ImmutableLongShortMap
toImmutable()
String
toString()
boolean
trimToSize()
short
updateValue(long key, short initialValueIfAbsent, ShortToShortFunction function)
void
updateValues(LongShortToShortFunction function)
MutableShortCollection
values()
LongShortHashMap
withKeysValues(long key1, short value1, long key2, short value2)
LongShortHashMap
withKeysValues(long key1, short value1, long key2, short value2, long key3, short value3)
LongShortHashMap
withKeysValues(long key1, short value1, long key2, short value2, long key3, short value3, long key4, short value4)
LongShortHashMap
withKeyValue(long key1, short value1)
LongShortHashMap
withoutAllKeys(LongIterable keys)
LongShortHashMap
withoutKey(long key)
void
writeExternal(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:
equals
in interfaceLongShortMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceLongShortMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceLongShortMap
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classAbstractShortIterable
-
shortIterator
public MutableShortIterator shortIterator()
- Specified by:
shortIterator
in interfaceMutableShortValuesMap
- Specified by:
shortIterator
in interfaceShortIterable
-
injectInto
public <V> V injectInto(V injectedValue, ObjectShortToObjectFunction<? super V,? extends V> function)
- Specified by:
injectInto
in interfaceShortIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableLongKeysMap
- Specified by:
clear
in interfaceMutableShortValuesMap
-
put
public void put(long key, short value)
- Specified by:
put
in interfaceMutableLongShortMap
-
putAll
public void putAll(LongShortMap map)
- Specified by:
putAll
in interfaceMutableLongShortMap
-
updateValues
public void updateValues(LongShortToShortFunction function)
- Specified by:
updateValues
in interfaceMutableLongShortMap
-
removeKey
public void removeKey(long key)
- Specified by:
removeKey
in interfaceMutableLongKeysMap
- Specified by:
removeKey
in interfaceMutableLongShortMap
-
remove
public void remove(long key)
- Specified by:
remove
in interfaceMutableLongShortMap
-
removeKeyIfAbsent
public short removeKeyIfAbsent(long key, short value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableLongShortMap
-
getIfAbsentPut
public short getIfAbsentPut(long key, short value)
- Specified by:
getIfAbsentPut
in interfaceMutableLongShortMap
-
getAndPut
public short getAndPut(long key, short putValue, short defaultValue)
- Specified by:
getAndPut
in interfaceMutableLongShortMap
-
getIfAbsentPut
public short getIfAbsentPut(long key, ShortFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableLongShortMap
-
getIfAbsentPutWith
public <P> short getIfAbsentPutWith(long key, ShortFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableLongShortMap
-
getIfAbsentPutWithKey
public short getIfAbsentPutWithKey(long key, LongToShortFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableLongShortMap
-
addToValue
public short addToValue(long key, short toBeAdded)
- Specified by:
addToValue
in interfaceMutableLongShortMap
-
updateValue
public short updateValue(long key, short initialValueIfAbsent, ShortToShortFunction function)
- Specified by:
updateValue
in interfaceMutableLongShortMap
-
withKeyValue
public LongShortHashMap withKeyValue(long key1, short value1)
- Specified by:
withKeyValue
in 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:
withoutKey
in interfaceMutableLongShortMap
-
withoutAllKeys
public LongShortHashMap withoutAllKeys(LongIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableLongShortMap
-
asUnmodifiable
public MutableLongShortMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableLongShortMap
-
asSynchronized
public MutableLongShortMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableLongShortMap
-
toImmutable
public ImmutableLongShortMap toImmutable()
- Specified by:
toImmutable
in interfaceLongShortMap
-
get
public short get(long key)
- Specified by:
get
in interfaceLongShortMap
-
getIfAbsent
public short getIfAbsent(long key, short ifAbsent)
- Specified by:
getIfAbsent
in interfaceLongShortMap
-
getOrThrow
public short getOrThrow(long key)
- Specified by:
getOrThrow
in interfaceLongShortMap
-
containsKey
public boolean containsKey(long key)
- Specified by:
containsKey
in interfaceLongKeysMap
- Specified by:
containsKey
in interfaceLongShortMap
-
forEachKey
public void forEachKey(LongProcedure procedure)
- Specified by:
forEachKey
in interfaceLongKeysMap
- Specified by:
forEachKey
in interfaceLongShortMap
-
forEachKeyValue
public void forEachKeyValue(LongShortProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceLongShortMap
-
keysView
public LazyLongIterable keysView()
- Specified by:
keysView
in interfaceLongShortMap
-
keyValuesView
public RichIterable<LongShortPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceLongShortMap
-
flipUniqueValues
public MutableShortLongMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceLongShortMap
- Specified by:
flipUniqueValues
in interfaceMutableLongShortMap
-
select
public LongShortHashMap select(LongShortPredicate predicate)
- Specified by:
select
in interfaceLongShortMap
- Specified by:
select
in interfaceMutableLongShortMap
-
reject
public LongShortHashMap reject(LongShortPredicate predicate)
- Specified by:
reject
in interfaceLongShortMap
- Specified by:
reject
in interfaceMutableLongShortMap
-
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 interfaceLongShortMap
-
values
public MutableShortCollection values()
- Specified by:
values
in interfaceShortValuesMap
-
-