Class ByteByteHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractByteIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableByteValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.ByteByteHashMap
-
- All Implemented Interfaces:
Externalizable
,Serializable
,ByteIterable
,ByteByteMap
,ByteValuesMap
,MutableByteByteMap
,MutableByteValuesMap
,PrimitiveIterable
,MutableByteKeysMap
,ByteKeysMap
public class ByteByteHashMap extends AbstractMutableByteValuesMap implements MutableByteByteMap, Externalizable, MutableByteKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ByteByteHashMap()
ByteByteHashMap(int initialCapacity)
ByteByteHashMap(ByteByteMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description byte
addToValue(byte key, byte toBeAdded)
MutableByteByteMap
asSynchronized()
MutableByteByteMap
asUnmodifiable()
MutableByteIterator
byteIterator()
void
clear()
void
compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadboolean
containsKey(byte key)
boolean
equals(Object obj)
MutableByteByteMap
flipUniqueValues()
void
forEachKey(ByteProcedure procedure)
void
forEachKeyValue(ByteByteProcedure procedure)
byte
get(byte key)
byte
getAndPut(byte key, byte putValue, byte defaultValue)
byte
getIfAbsent(byte key, byte ifAbsent)
byte
getIfAbsentPut(byte key, byte value)
byte
getIfAbsentPut(byte key, ByteFunction0 function)
<P> byte
getIfAbsentPutWith(byte key, ByteFunction<? super P> function, P parameter)
byte
getIfAbsentPutWithKey(byte key, ByteToByteFunction function)
byte
getOrThrow(byte key)
int
hashCode()
<V> V
injectInto(V injectedValue, ObjectByteToObjectFunction<? super V,? extends V> function)
MutableByteSet
keySet()
LazyByteIterable
keysView()
RichIterable<ByteBytePair>
keyValuesView()
static ByteByteHashMap
newWithKeysValues(byte key1, byte value1)
static ByteByteHashMap
newWithKeysValues(byte key1, byte value1, byte key2, byte value2)
static ByteByteHashMap
newWithKeysValues(byte key1, byte value1, byte key2, byte value2, byte key3, byte value3)
static ByteByteHashMap
newWithKeysValues(byte key1, byte value1, byte key2, byte value2, byte key3, byte value3, byte key4, byte value4)
void
put(byte key, byte value)
void
putAll(ByteByteMap map)
void
readExternal(ObjectInput in)
ByteByteHashMap
reject(ByteBytePredicate predicate)
void
remove(byte key)
void
removeKey(byte key)
byte
removeKeyIfAbsent(byte key, byte value)
ByteByteHashMap
select(ByteBytePredicate predicate)
ImmutableByteByteMap
toImmutable()
String
toString()
boolean
trimToSize()
byte
updateValue(byte key, byte initialValueIfAbsent, ByteToByteFunction function)
void
updateValues(ByteByteToByteFunction function)
MutableByteCollection
values()
ByteByteHashMap
withKeysValues(byte key1, byte value1, byte key2, byte value2)
ByteByteHashMap
withKeysValues(byte key1, byte value1, byte key2, byte value2, byte key3, byte value3)
ByteByteHashMap
withKeysValues(byte key1, byte value1, byte key2, byte value2, byte key3, byte value3, byte key4, byte value4)
ByteByteHashMap
withKeyValue(byte key1, byte value1)
ByteByteHashMap
withoutAllKeys(ByteIterable keys)
ByteByteHashMap
withoutKey(byte 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.map.primitive.ByteByteMap
injectIntoKeyValue
-
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.impl.map.primitive.ByteKeysMap
isEmpty, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ByteValuesMap
containsValue, forEachValue, tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableByteByteMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableByteValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
-
-
-
Constructor Detail
-
ByteByteHashMap
public ByteByteHashMap()
-
ByteByteHashMap
public ByteByteHashMap(int initialCapacity)
-
ByteByteHashMap
public ByteByteHashMap(ByteByteMap map)
-
-
Method Detail
-
newWithKeysValues
public static ByteByteHashMap newWithKeysValues(byte key1, byte value1)
-
newWithKeysValues
public static ByteByteHashMap newWithKeysValues(byte key1, byte value1, byte key2, byte value2)
-
newWithKeysValues
public static ByteByteHashMap newWithKeysValues(byte key1, byte value1, byte key2, byte value2, byte key3, byte value3)
-
newWithKeysValues
public static ByteByteHashMap newWithKeysValues(byte key1, byte value1, byte key2, byte value2, byte key3, byte value3, byte key4, byte value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceByteByteMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceByteByteMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceByteByteMap
- Specified by:
toString
in interfacePrimitiveIterable
- 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 interfaceMutableByteKeysMap
- Specified by:
clear
in interfaceMutableByteValuesMap
-
put
public void put(byte key, byte value)
- Specified by:
put
in interfaceMutableByteByteMap
-
putAll
public void putAll(ByteByteMap map)
- Specified by:
putAll
in interfaceMutableByteByteMap
-
updateValues
public void updateValues(ByteByteToByteFunction function)
- Specified by:
updateValues
in interfaceMutableByteByteMap
-
removeKey
public void removeKey(byte key)
- Specified by:
removeKey
in interfaceMutableByteByteMap
- Specified by:
removeKey
in interfaceMutableByteKeysMap
-
remove
public void remove(byte key)
- Specified by:
remove
in interfaceMutableByteByteMap
-
removeKeyIfAbsent
public byte removeKeyIfAbsent(byte key, byte value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableByteByteMap
-
getIfAbsentPut
public byte getIfAbsentPut(byte key, byte value)
- Specified by:
getIfAbsentPut
in interfaceMutableByteByteMap
-
getAndPut
public byte getAndPut(byte key, byte putValue, byte defaultValue)
- Specified by:
getAndPut
in interfaceMutableByteByteMap
-
getIfAbsentPut
public byte getIfAbsentPut(byte key, ByteFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableByteByteMap
-
getIfAbsentPutWith
public <P> byte getIfAbsentPutWith(byte key, ByteFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableByteByteMap
-
getIfAbsentPutWithKey
public byte getIfAbsentPutWithKey(byte key, ByteToByteFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableByteByteMap
-
addToValue
public byte addToValue(byte key, byte toBeAdded)
- Specified by:
addToValue
in interfaceMutableByteByteMap
-
updateValue
public byte updateValue(byte key, byte initialValueIfAbsent, ByteToByteFunction function)
- Specified by:
updateValue
in interfaceMutableByteByteMap
-
withKeyValue
public ByteByteHashMap withKeyValue(byte key1, byte value1)
- Specified by:
withKeyValue
in interfaceMutableByteByteMap
-
withKeysValues
public ByteByteHashMap withKeysValues(byte key1, byte value1, byte key2, byte value2)
-
withKeysValues
public ByteByteHashMap withKeysValues(byte key1, byte value1, byte key2, byte value2, byte key3, byte value3)
-
withKeysValues
public ByteByteHashMap withKeysValues(byte key1, byte value1, byte key2, byte value2, byte key3, byte value3, byte key4, byte value4)
-
withoutKey
public ByteByteHashMap withoutKey(byte key)
- Specified by:
withoutKey
in interfaceMutableByteByteMap
-
withoutAllKeys
public ByteByteHashMap withoutAllKeys(ByteIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableByteByteMap
-
asUnmodifiable
public MutableByteByteMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableByteByteMap
-
asSynchronized
public MutableByteByteMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableByteByteMap
-
toImmutable
public ImmutableByteByteMap toImmutable()
- Specified by:
toImmutable
in interfaceByteByteMap
-
get
public byte get(byte key)
- Specified by:
get
in interfaceByteByteMap
-
getIfAbsent
public byte getIfAbsent(byte key, byte ifAbsent)
- Specified by:
getIfAbsent
in interfaceByteByteMap
-
getOrThrow
public byte getOrThrow(byte key)
- Specified by:
getOrThrow
in interfaceByteByteMap
-
containsKey
public boolean containsKey(byte key)
- Specified by:
containsKey
in interfaceByteByteMap
- Specified by:
containsKey
in interfaceByteKeysMap
-
forEachKey
public void forEachKey(ByteProcedure procedure)
- Specified by:
forEachKey
in interfaceByteByteMap
- Specified by:
forEachKey
in interfaceByteKeysMap
-
forEachKeyValue
public void forEachKeyValue(ByteByteProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceByteByteMap
-
keysView
public LazyByteIterable keysView()
- Specified by:
keysView
in interfaceByteByteMap
-
keyValuesView
public RichIterable<ByteBytePair> keyValuesView()
- Specified by:
keyValuesView
in interfaceByteByteMap
-
flipUniqueValues
public MutableByteByteMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceByteByteMap
- Specified by:
flipUniqueValues
in interfaceMutableByteByteMap
-
select
public ByteByteHashMap select(ByteBytePredicate predicate)
- Specified by:
select
in interfaceByteByteMap
- Specified by:
select
in interfaceMutableByteByteMap
-
reject
public ByteByteHashMap reject(ByteBytePredicate predicate)
- Specified by:
reject
in interfaceByteByteMap
- Specified by:
reject
in interfaceMutableByteByteMap
-
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 MutableByteSet keySet()
- Specified by:
keySet
in interfaceByteByteMap
-
values
public MutableByteCollection values()
- Specified by:
values
in interfaceByteValuesMap
-
-