Class ShortByteHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractByteIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableByteValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.ShortByteHashMap
-
- All Implemented Interfaces:
Externalizable
,Serializable
,ByteIterable
,ByteValuesMap
,MutableByteValuesMap
,MutableShortByteMap
,ShortByteMap
,PrimitiveIterable
,MutableShortKeysMap
,ShortKeysMap
public class ShortByteHashMap extends AbstractMutableByteValuesMap implements MutableShortByteMap, Externalizable, MutableShortKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ShortByteHashMap()
ShortByteHashMap(int initialCapacity)
ShortByteHashMap(ShortByteMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description byte
addToValue(short key, byte toBeAdded)
MutableShortByteMap
asSynchronized()
MutableShortByteMap
asUnmodifiable()
MutableByteIterator
byteIterator()
void
clear()
void
compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadboolean
containsKey(short key)
boolean
equals(Object obj)
MutableByteShortMap
flipUniqueValues()
void
forEachKey(ShortProcedure procedure)
void
forEachKeyValue(ShortByteProcedure procedure)
byte
get(short key)
byte
getAndPut(short key, byte putValue, byte defaultValue)
byte
getIfAbsent(short key, byte ifAbsent)
byte
getIfAbsentPut(short key, byte value)
byte
getIfAbsentPut(short key, ByteFunction0 function)
<P> byte
getIfAbsentPutWith(short key, ByteFunction<? super P> function, P parameter)
byte
getIfAbsentPutWithKey(short key, ShortToByteFunction function)
byte
getOrThrow(short key)
int
hashCode()
<V> V
injectInto(V injectedValue, ObjectByteToObjectFunction<? super V,? extends V> function)
MutableShortSet
keySet()
LazyShortIterable
keysView()
RichIterable<ShortBytePair>
keyValuesView()
static ShortByteHashMap
newWithKeysValues(short key1, byte value1)
static ShortByteHashMap
newWithKeysValues(short key1, byte value1, short key2, byte value2)
static ShortByteHashMap
newWithKeysValues(short key1, byte value1, short key2, byte value2, short key3, byte value3)
static ShortByteHashMap
newWithKeysValues(short key1, byte value1, short key2, byte value2, short key3, byte value3, short key4, byte value4)
void
put(short key, byte value)
void
putAll(ShortByteMap map)
void
readExternal(ObjectInput in)
ShortByteHashMap
reject(ShortBytePredicate predicate)
void
remove(short key)
void
removeKey(short key)
byte
removeKeyIfAbsent(short key, byte value)
ShortByteHashMap
select(ShortBytePredicate predicate)
ImmutableShortByteMap
toImmutable()
String
toString()
boolean
trimToSize()
byte
updateValue(short key, byte initialValueIfAbsent, ByteToByteFunction function)
void
updateValues(ShortByteToByteFunction function)
MutableByteCollection
values()
ShortByteHashMap
withKeysValues(short key1, byte value1, short key2, byte value2)
ShortByteHashMap
withKeysValues(short key1, byte value1, short key2, byte value2, short key3, byte value3)
ShortByteHashMap
withKeysValues(short key1, byte value1, short key2, byte value2, short key3, byte value3, short key4, byte value4)
ShortByteHashMap
withKeyValue(short key1, byte value1)
ShortByteHashMap
withoutAllKeys(ShortIterable keys)
ShortByteHashMap
withoutKey(short key)
void
writeExternal(ObjectOutput out)
-
Methods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableByteValuesMap
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.AbstractByteIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
-
Methods inherited from interface org.eclipse.collections.api.ByteIterable
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.ByteValuesMap
containsValue, forEachValue, tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableByteValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortByteMap
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.api.map.primitive.ShortByteMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.ShortKeysMap
isEmpty, notEmpty, size
-
-
-
-
Constructor Detail
-
ShortByteHashMap
public ShortByteHashMap()
-
ShortByteHashMap
public ShortByteHashMap(int initialCapacity)
-
ShortByteHashMap
public ShortByteHashMap(ShortByteMap map)
-
-
Method Detail
-
newWithKeysValues
public static ShortByteHashMap newWithKeysValues(short key1, byte value1)
-
newWithKeysValues
public static ShortByteHashMap newWithKeysValues(short key1, byte value1, short key2, byte value2)
-
newWithKeysValues
public static ShortByteHashMap newWithKeysValues(short key1, byte value1, short key2, byte value2, short key3, byte value3)
-
newWithKeysValues
public static ShortByteHashMap newWithKeysValues(short key1, byte value1, short key2, byte value2, short key3, byte value3, short key4, byte value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceShortByteMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceShortByteMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfacePrimitiveIterable
- Specified by:
toString
in interfaceShortByteMap
- Overrides:
toString
in classAbstractByteIterable
-
byteIterator
public MutableByteIterator byteIterator()
- Specified by:
byteIterator
in interfaceByteIterable
- Specified by:
byteIterator
in interfaceMutableByteValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectByteToObjectFunction<? super V,? extends V> function)
- Specified by:
injectInto
in interfaceByteIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableByteValuesMap
- Specified by:
clear
in interfaceMutableShortKeysMap
-
put
public void put(short key, byte value)
- Specified by:
put
in interfaceMutableShortByteMap
-
putAll
public void putAll(ShortByteMap map)
- Specified by:
putAll
in interfaceMutableShortByteMap
-
updateValues
public void updateValues(ShortByteToByteFunction function)
- Specified by:
updateValues
in interfaceMutableShortByteMap
-
removeKey
public void removeKey(short key)
- Specified by:
removeKey
in interfaceMutableShortByteMap
- Specified by:
removeKey
in interfaceMutableShortKeysMap
-
remove
public void remove(short key)
- Specified by:
remove
in interfaceMutableShortByteMap
-
removeKeyIfAbsent
public byte removeKeyIfAbsent(short key, byte value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableShortByteMap
-
getIfAbsentPut
public byte getIfAbsentPut(short key, byte value)
- Specified by:
getIfAbsentPut
in interfaceMutableShortByteMap
-
getAndPut
public byte getAndPut(short key, byte putValue, byte defaultValue)
- Specified by:
getAndPut
in interfaceMutableShortByteMap
-
getIfAbsentPut
public byte getIfAbsentPut(short key, ByteFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableShortByteMap
-
getIfAbsentPutWith
public <P> byte getIfAbsentPutWith(short key, ByteFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableShortByteMap
-
getIfAbsentPutWithKey
public byte getIfAbsentPutWithKey(short key, ShortToByteFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableShortByteMap
-
addToValue
public byte addToValue(short key, byte toBeAdded)
- Specified by:
addToValue
in interfaceMutableShortByteMap
-
updateValue
public byte updateValue(short key, byte initialValueIfAbsent, ByteToByteFunction function)
- Specified by:
updateValue
in interfaceMutableShortByteMap
-
withKeyValue
public ShortByteHashMap withKeyValue(short key1, byte value1)
- Specified by:
withKeyValue
in interfaceMutableShortByteMap
-
withKeysValues
public ShortByteHashMap withKeysValues(short key1, byte value1, short key2, byte value2)
-
withKeysValues
public ShortByteHashMap withKeysValues(short key1, byte value1, short key2, byte value2, short key3, byte value3)
-
withKeysValues
public ShortByteHashMap withKeysValues(short key1, byte value1, short key2, byte value2, short key3, byte value3, short key4, byte value4)
-
withoutKey
public ShortByteHashMap withoutKey(short key)
- Specified by:
withoutKey
in interfaceMutableShortByteMap
-
withoutAllKeys
public ShortByteHashMap withoutAllKeys(ShortIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableShortByteMap
-
asUnmodifiable
public MutableShortByteMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableShortByteMap
-
asSynchronized
public MutableShortByteMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableShortByteMap
-
toImmutable
public ImmutableShortByteMap toImmutable()
- Specified by:
toImmutable
in interfaceShortByteMap
-
get
public byte get(short key)
- Specified by:
get
in interfaceShortByteMap
-
getIfAbsent
public byte getIfAbsent(short key, byte ifAbsent)
- Specified by:
getIfAbsent
in interfaceShortByteMap
-
getOrThrow
public byte getOrThrow(short key)
- Specified by:
getOrThrow
in interfaceShortByteMap
-
containsKey
public boolean containsKey(short key)
- Specified by:
containsKey
in interfaceShortByteMap
- Specified by:
containsKey
in interfaceShortKeysMap
-
forEachKey
public void forEachKey(ShortProcedure procedure)
- Specified by:
forEachKey
in interfaceShortByteMap
- Specified by:
forEachKey
in interfaceShortKeysMap
-
forEachKeyValue
public void forEachKeyValue(ShortByteProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceShortByteMap
-
keysView
public LazyShortIterable keysView()
- Specified by:
keysView
in interfaceShortByteMap
-
keyValuesView
public RichIterable<ShortBytePair> keyValuesView()
- Specified by:
keyValuesView
in interfaceShortByteMap
-
flipUniqueValues
public MutableByteShortMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceMutableShortByteMap
- Specified by:
flipUniqueValues
in interfaceShortByteMap
-
select
public ShortByteHashMap select(ShortBytePredicate predicate)
- Specified by:
select
in interfaceMutableShortByteMap
- Specified by:
select
in interfaceShortByteMap
-
reject
public ShortByteHashMap reject(ShortBytePredicate predicate)
- Specified by:
reject
in interfaceMutableShortByteMap
- Specified by:
reject
in interfaceShortByteMap
-
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 MutableShortSet keySet()
- Specified by:
keySet
in interfaceShortByteMap
-
values
public MutableByteCollection values()
- Specified by:
values
in interfaceByteValuesMap
-
-