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 byteaddToValue(short key, byte toBeAdded)MutableShortByteMapasSynchronized()MutableShortByteMapasUnmodifiable()MutableByteIteratorbyteIterator()voidclear()voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontainsKey(short key)booleanequals(Object obj)MutableByteShortMapflipUniqueValues()voidforEachKey(ShortProcedure procedure)voidforEachKeyValue(ShortByteProcedure procedure)byteget(short key)bytegetAndPut(short key, byte putValue, byte defaultValue)bytegetIfAbsent(short key, byte ifAbsent)bytegetIfAbsentPut(short key, byte value)bytegetIfAbsentPut(short key, ByteFunction0 function)<P> bytegetIfAbsentPutWith(short key, ByteFunction<? super P> function, P parameter)bytegetIfAbsentPutWithKey(short key, ShortToByteFunction function)bytegetOrThrow(short key)inthashCode()<V> VinjectInto(V injectedValue, ObjectByteToObjectFunction<? super V,? extends V> function)MutableShortSetkeySet()LazyShortIterablekeysView()RichIterable<ShortBytePair>keyValuesView()static ShortByteHashMapnewWithKeysValues(short key1, byte value1)static ShortByteHashMapnewWithKeysValues(short key1, byte value1, short key2, byte value2)static ShortByteHashMapnewWithKeysValues(short key1, byte value1, short key2, byte value2, short key3, byte value3)static ShortByteHashMapnewWithKeysValues(short key1, byte value1, short key2, byte value2, short key3, byte value3, short key4, byte value4)voidput(short key, byte value)voidputAll(ShortByteMap map)voidreadExternal(ObjectInput in)ShortByteHashMapreject(ShortBytePredicate predicate)voidremove(short key)voidremoveKey(short key)byteremoveKeyIfAbsent(short key, byte value)ShortByteHashMapselect(ShortBytePredicate predicate)ImmutableShortByteMaptoImmutable()StringtoString()booleantrimToSize()byteupdateValue(short key, byte initialValueIfAbsent, ByteToByteFunction function)voidupdateValues(ShortByteToByteFunction function)MutableByteCollectionvalues()ShortByteHashMapwithKeysValues(short key1, byte value1, short key2, byte value2)ShortByteHashMapwithKeysValues(short key1, byte value1, short key2, byte value2, short key3, byte value3)ShortByteHashMapwithKeysValues(short key1, byte value1, short key2, byte value2, short key3, byte value3, short key4, byte value4)ShortByteHashMapwithKeyValue(short key1, byte value1)ShortByteHashMapwithoutAllKeys(ShortIterable keys)ShortByteHashMapwithoutKey(short key)voidwriteExternal(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:
equalsin interfaceShortByteMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceShortByteMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfacePrimitiveIterable- Specified by:
toStringin interfaceShortByteMap- Overrides:
toStringin classAbstractByteIterable
-
byteIterator
public MutableByteIterator byteIterator()
- Specified by:
byteIteratorin interfaceByteIterable- Specified by:
byteIteratorin interfaceMutableByteValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectByteToObjectFunction<? super V,? extends V> function)- Specified by:
injectIntoin interfaceByteIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableByteValuesMap- Specified by:
clearin interfaceMutableShortKeysMap
-
put
public void put(short key, byte value)- Specified by:
putin interfaceMutableShortByteMap
-
putAll
public void putAll(ShortByteMap map)
- Specified by:
putAllin interfaceMutableShortByteMap
-
updateValues
public void updateValues(ShortByteToByteFunction function)
- Specified by:
updateValuesin interfaceMutableShortByteMap
-
removeKey
public void removeKey(short key)
- Specified by:
removeKeyin interfaceMutableShortByteMap- Specified by:
removeKeyin interfaceMutableShortKeysMap
-
remove
public void remove(short key)
- Specified by:
removein interfaceMutableShortByteMap
-
removeKeyIfAbsent
public byte removeKeyIfAbsent(short key, byte value)- Specified by:
removeKeyIfAbsentin interfaceMutableShortByteMap
-
getIfAbsentPut
public byte getIfAbsentPut(short key, byte value)- Specified by:
getIfAbsentPutin interfaceMutableShortByteMap
-
getAndPut
public byte getAndPut(short key, byte putValue, byte defaultValue)- Specified by:
getAndPutin interfaceMutableShortByteMap
-
getIfAbsentPut
public byte getIfAbsentPut(short key, ByteFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableShortByteMap
-
getIfAbsentPutWith
public <P> byte getIfAbsentPutWith(short key, ByteFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableShortByteMap
-
getIfAbsentPutWithKey
public byte getIfAbsentPutWithKey(short key, ShortToByteFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableShortByteMap
-
addToValue
public byte addToValue(short key, byte toBeAdded)- Specified by:
addToValuein interfaceMutableShortByteMap
-
updateValue
public byte updateValue(short key, byte initialValueIfAbsent, ByteToByteFunction function)- Specified by:
updateValuein interfaceMutableShortByteMap
-
withKeyValue
public ShortByteHashMap withKeyValue(short key1, byte value1)
- Specified by:
withKeyValuein 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:
withoutKeyin interfaceMutableShortByteMap
-
withoutAllKeys
public ShortByteHashMap withoutAllKeys(ShortIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableShortByteMap
-
asUnmodifiable
public MutableShortByteMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableShortByteMap
-
asSynchronized
public MutableShortByteMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableShortByteMap
-
toImmutable
public ImmutableShortByteMap toImmutable()
- Specified by:
toImmutablein interfaceShortByteMap
-
get
public byte get(short key)
- Specified by:
getin interfaceShortByteMap
-
getIfAbsent
public byte getIfAbsent(short key, byte ifAbsent)- Specified by:
getIfAbsentin interfaceShortByteMap
-
getOrThrow
public byte getOrThrow(short key)
- Specified by:
getOrThrowin interfaceShortByteMap
-
containsKey
public boolean containsKey(short key)
- Specified by:
containsKeyin interfaceShortByteMap- Specified by:
containsKeyin interfaceShortKeysMap
-
forEachKey
public void forEachKey(ShortProcedure procedure)
- Specified by:
forEachKeyin interfaceShortByteMap- Specified by:
forEachKeyin interfaceShortKeysMap
-
forEachKeyValue
public void forEachKeyValue(ShortByteProcedure procedure)
- Specified by:
forEachKeyValuein interfaceShortByteMap
-
keysView
public LazyShortIterable keysView()
- Specified by:
keysViewin interfaceShortByteMap
-
keyValuesView
public RichIterable<ShortBytePair> keyValuesView()
- Specified by:
keyValuesViewin interfaceShortByteMap
-
flipUniqueValues
public MutableByteShortMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceMutableShortByteMap- Specified by:
flipUniqueValuesin interfaceShortByteMap
-
select
public ShortByteHashMap select(ShortBytePredicate predicate)
- Specified by:
selectin interfaceMutableShortByteMap- Specified by:
selectin interfaceShortByteMap
-
reject
public ShortByteHashMap reject(ShortBytePredicate predicate)
- Specified by:
rejectin interfaceMutableShortByteMap- Specified by:
rejectin interfaceShortByteMap
-
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 interfaceShortByteMap
-
values
public MutableByteCollection values()
- Specified by:
valuesin interfaceByteValuesMap
-
-