Class ByteIntHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractIntIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableIntValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.ByteIntHashMap
-
- All Implemented Interfaces:
Externalizable
,Serializable
,IntIterable
,ByteIntMap
,IntValuesMap
,MutableByteIntMap
,MutableIntValuesMap
,PrimitiveIterable
,MutableByteKeysMap
,ByteKeysMap
public class ByteIntHashMap extends AbstractMutableIntValuesMap implements MutableByteIntMap, Externalizable, MutableByteKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ByteIntHashMap()
ByteIntHashMap(int initialCapacity)
ByteIntHashMap(ByteIntMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
addToValue(byte key, int toBeAdded)
MutableByteIntMap
asSynchronized()
MutableByteIntMap
asUnmodifiable()
void
clear()
void
compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadboolean
containsKey(byte key)
boolean
equals(Object obj)
MutableIntByteMap
flipUniqueValues()
void
forEachKey(ByteProcedure procedure)
void
forEachKeyValue(ByteIntProcedure procedure)
int
get(byte key)
int
getAndPut(byte key, int putValue, int defaultValue)
int
getIfAbsent(byte key, int ifAbsent)
int
getIfAbsentPut(byte key, int value)
int
getIfAbsentPut(byte key, IntFunction0 function)
<P> int
getIfAbsentPutWith(byte key, IntFunction<? super P> function, P parameter)
int
getIfAbsentPutWithKey(byte key, ByteToIntFunction function)
int
getOrThrow(byte key)
int
hashCode()
<V> V
injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)
MutableIntIterator
intIterator()
MutableByteSet
keySet()
LazyByteIterable
keysView()
RichIterable<ByteIntPair>
keyValuesView()
static ByteIntHashMap
newWithKeysValues(byte key1, int value1)
static ByteIntHashMap
newWithKeysValues(byte key1, int value1, byte key2, int value2)
static ByteIntHashMap
newWithKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3)
static ByteIntHashMap
newWithKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3, byte key4, int value4)
void
put(byte key, int value)
void
putAll(ByteIntMap map)
void
readExternal(ObjectInput in)
ByteIntHashMap
reject(ByteIntPredicate predicate)
void
remove(byte key)
void
removeKey(byte key)
int
removeKeyIfAbsent(byte key, int value)
ByteIntHashMap
select(ByteIntPredicate predicate)
ImmutableByteIntMap
toImmutable()
String
toString()
boolean
trimToSize()
int
updateValue(byte key, int initialValueIfAbsent, IntToIntFunction function)
void
updateValues(ByteIntToIntFunction function)
MutableIntCollection
values()
ByteIntHashMap
withKeysValues(byte key1, int value1, byte key2, int value2)
ByteIntHashMap
withKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3)
ByteIntHashMap
withKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3, byte key4, int value4)
ByteIntHashMap
withKeyValue(byte key1, int value1)
ByteIntHashMap
withoutAllKeys(ByteIterable keys)
ByteIntHashMap
withoutKey(byte key)
void
writeExternal(ObjectOutput out)
-
Methods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableIntValuesMap
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.AbstractIntIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ByteIntMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.ByteKeysMap
isEmpty, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.IntIterable
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.IntValuesMap
containsValue, forEachValue, tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableByteIntMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
-
-
-
Constructor Detail
-
ByteIntHashMap
public ByteIntHashMap()
-
ByteIntHashMap
public ByteIntHashMap(int initialCapacity)
-
ByteIntHashMap
public ByteIntHashMap(ByteIntMap map)
-
-
Method Detail
-
newWithKeysValues
public static ByteIntHashMap newWithKeysValues(byte key1, int value1)
-
newWithKeysValues
public static ByteIntHashMap newWithKeysValues(byte key1, int value1, byte key2, int value2)
-
newWithKeysValues
public static ByteIntHashMap newWithKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3)
-
newWithKeysValues
public static ByteIntHashMap newWithKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3, byte key4, int value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceByteIntMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceByteIntMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceByteIntMap
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classAbstractIntIterable
-
intIterator
public MutableIntIterator intIterator()
- Specified by:
intIterator
in interfaceIntIterable
- Specified by:
intIterator
in interfaceMutableIntValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)
- Specified by:
injectInto
in interfaceIntIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableByteKeysMap
- Specified by:
clear
in interfaceMutableIntValuesMap
-
put
public void put(byte key, int value)
- Specified by:
put
in interfaceMutableByteIntMap
-
putAll
public void putAll(ByteIntMap map)
- Specified by:
putAll
in interfaceMutableByteIntMap
-
updateValues
public void updateValues(ByteIntToIntFunction function)
- Specified by:
updateValues
in interfaceMutableByteIntMap
-
removeKey
public void removeKey(byte key)
- Specified by:
removeKey
in interfaceMutableByteIntMap
- Specified by:
removeKey
in interfaceMutableByteKeysMap
-
remove
public void remove(byte key)
- Specified by:
remove
in interfaceMutableByteIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(byte key, int value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableByteIntMap
-
getIfAbsentPut
public int getIfAbsentPut(byte key, int value)
- Specified by:
getIfAbsentPut
in interfaceMutableByteIntMap
-
getAndPut
public int getAndPut(byte key, int putValue, int defaultValue)
- Specified by:
getAndPut
in interfaceMutableByteIntMap
-
getIfAbsentPut
public int getIfAbsentPut(byte key, IntFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableByteIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(byte key, IntFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableByteIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(byte key, ByteToIntFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableByteIntMap
-
addToValue
public int addToValue(byte key, int toBeAdded)
- Specified by:
addToValue
in interfaceMutableByteIntMap
-
updateValue
public int updateValue(byte key, int initialValueIfAbsent, IntToIntFunction function)
- Specified by:
updateValue
in interfaceMutableByteIntMap
-
withKeyValue
public ByteIntHashMap withKeyValue(byte key1, int value1)
- Specified by:
withKeyValue
in interfaceMutableByteIntMap
-
withKeysValues
public ByteIntHashMap withKeysValues(byte key1, int value1, byte key2, int value2)
-
withKeysValues
public ByteIntHashMap withKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3)
-
withKeysValues
public ByteIntHashMap withKeysValues(byte key1, int value1, byte key2, int value2, byte key3, int value3, byte key4, int value4)
-
withoutKey
public ByteIntHashMap withoutKey(byte key)
- Specified by:
withoutKey
in interfaceMutableByteIntMap
-
withoutAllKeys
public ByteIntHashMap withoutAllKeys(ByteIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableByteIntMap
-
asUnmodifiable
public MutableByteIntMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableByteIntMap
-
asSynchronized
public MutableByteIntMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableByteIntMap
-
toImmutable
public ImmutableByteIntMap toImmutable()
- Specified by:
toImmutable
in interfaceByteIntMap
-
get
public int get(byte key)
- Specified by:
get
in interfaceByteIntMap
-
getIfAbsent
public int getIfAbsent(byte key, int ifAbsent)
- Specified by:
getIfAbsent
in interfaceByteIntMap
-
getOrThrow
public int getOrThrow(byte key)
- Specified by:
getOrThrow
in interfaceByteIntMap
-
containsKey
public boolean containsKey(byte key)
- Specified by:
containsKey
in interfaceByteIntMap
- Specified by:
containsKey
in interfaceByteKeysMap
-
forEachKey
public void forEachKey(ByteProcedure procedure)
- Specified by:
forEachKey
in interfaceByteIntMap
- Specified by:
forEachKey
in interfaceByteKeysMap
-
forEachKeyValue
public void forEachKeyValue(ByteIntProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceByteIntMap
-
keysView
public LazyByteIterable keysView()
- Specified by:
keysView
in interfaceByteIntMap
-
keyValuesView
public RichIterable<ByteIntPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceByteIntMap
-
flipUniqueValues
public MutableIntByteMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceByteIntMap
- Specified by:
flipUniqueValues
in interfaceMutableByteIntMap
-
select
public ByteIntHashMap select(ByteIntPredicate predicate)
- Specified by:
select
in interfaceByteIntMap
- Specified by:
select
in interfaceMutableByteIntMap
-
reject
public ByteIntHashMap reject(ByteIntPredicate predicate)
- Specified by:
reject
in interfaceByteIntMap
- Specified by:
reject
in interfaceMutableByteIntMap
-
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 interfaceByteIntMap
-
values
public MutableIntCollection values()
- Specified by:
values
in interfaceIntValuesMap
-
-