Class ByteLongHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractLongIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableLongValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.ByteLongHashMap
-
- All Implemented Interfaces:
Externalizable
,Serializable
,LongIterable
,ByteLongMap
,LongValuesMap
,MutableByteLongMap
,MutableLongValuesMap
,PrimitiveIterable
,MutableByteKeysMap
,ByteKeysMap
public class ByteLongHashMap extends AbstractMutableLongValuesMap implements MutableByteLongMap, Externalizable, MutableByteKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ByteLongHashMap()
ByteLongHashMap(int initialCapacity)
ByteLongHashMap(ByteLongMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description long
addToValue(byte key, long toBeAdded)
MutableByteLongMap
asSynchronized()
MutableByteLongMap
asUnmodifiable()
void
clear()
void
compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadboolean
containsKey(byte key)
boolean
equals(Object obj)
MutableLongByteMap
flipUniqueValues()
void
forEachKey(ByteProcedure procedure)
void
forEachKeyValue(ByteLongProcedure procedure)
long
get(byte key)
long
getAndPut(byte key, long putValue, long defaultValue)
long
getIfAbsent(byte key, long ifAbsent)
long
getIfAbsentPut(byte key, long value)
long
getIfAbsentPut(byte key, LongFunction0 function)
<P> long
getIfAbsentPutWith(byte key, LongFunction<? super P> function, P parameter)
long
getIfAbsentPutWithKey(byte key, ByteToLongFunction function)
long
getOrThrow(byte key)
int
hashCode()
<V> V
injectInto(V injectedValue, ObjectLongToObjectFunction<? super V,? extends V> function)
MutableByteSet
keySet()
LazyByteIterable
keysView()
RichIterable<ByteLongPair>
keyValuesView()
MutableLongIterator
longIterator()
static ByteLongHashMap
newWithKeysValues(byte key1, long value1)
static ByteLongHashMap
newWithKeysValues(byte key1, long value1, byte key2, long value2)
static ByteLongHashMap
newWithKeysValues(byte key1, long value1, byte key2, long value2, byte key3, long value3)
static ByteLongHashMap
newWithKeysValues(byte key1, long value1, byte key2, long value2, byte key3, long value3, byte key4, long value4)
void
put(byte key, long value)
void
putAll(ByteLongMap map)
void
readExternal(ObjectInput in)
ByteLongHashMap
reject(ByteLongPredicate predicate)
void
remove(byte key)
void
removeKey(byte key)
long
removeKeyIfAbsent(byte key, long value)
ByteLongHashMap
select(ByteLongPredicate predicate)
ImmutableByteLongMap
toImmutable()
String
toString()
boolean
trimToSize()
long
updateValue(byte key, long initialValueIfAbsent, LongToLongFunction function)
void
updateValues(ByteLongToLongFunction function)
MutableLongCollection
values()
ByteLongHashMap
withKeysValues(byte key1, long value1, byte key2, long value2)
ByteLongHashMap
withKeysValues(byte key1, long value1, byte key2, long value2, byte key3, long value3)
ByteLongHashMap
withKeysValues(byte key1, long value1, byte key2, long value2, byte key3, long value3, byte key4, long value4)
ByteLongHashMap
withKeyValue(byte key1, long value1)
ByteLongHashMap
withoutAllKeys(ByteIterable keys)
ByteLongHashMap
withoutKey(byte key)
void
writeExternal(ObjectOutput out)
-
Methods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableLongValuesMap
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.AbstractLongIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.ByteKeysMap
isEmpty, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ByteLongMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.api.LongIterable
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.LongValuesMap
containsValue, forEachValue, tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableByteLongMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableLongValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
-
-
-
Constructor Detail
-
ByteLongHashMap
public ByteLongHashMap()
-
ByteLongHashMap
public ByteLongHashMap(int initialCapacity)
-
ByteLongHashMap
public ByteLongHashMap(ByteLongMap map)
-
-
Method Detail
-
newWithKeysValues
public static ByteLongHashMap newWithKeysValues(byte key1, long value1)
-
newWithKeysValues
public static ByteLongHashMap newWithKeysValues(byte key1, long value1, byte key2, long value2)
-
newWithKeysValues
public static ByteLongHashMap newWithKeysValues(byte key1, long value1, byte key2, long value2, byte key3, long value3)
-
newWithKeysValues
public static ByteLongHashMap newWithKeysValues(byte key1, long value1, byte key2, long value2, byte key3, long value3, byte key4, long value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceByteLongMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceByteLongMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceByteLongMap
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classAbstractLongIterable
-
longIterator
public MutableLongIterator longIterator()
- Specified by:
longIterator
in interfaceLongIterable
- Specified by:
longIterator
in interfaceMutableLongValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectLongToObjectFunction<? super V,? extends V> function)
- Specified by:
injectInto
in interfaceLongIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableByteKeysMap
- Specified by:
clear
in interfaceMutableLongValuesMap
-
put
public void put(byte key, long value)
- Specified by:
put
in interfaceMutableByteLongMap
-
putAll
public void putAll(ByteLongMap map)
- Specified by:
putAll
in interfaceMutableByteLongMap
-
updateValues
public void updateValues(ByteLongToLongFunction function)
- Specified by:
updateValues
in interfaceMutableByteLongMap
-
removeKey
public void removeKey(byte key)
- Specified by:
removeKey
in interfaceMutableByteKeysMap
- Specified by:
removeKey
in interfaceMutableByteLongMap
-
remove
public void remove(byte key)
- Specified by:
remove
in interfaceMutableByteLongMap
-
removeKeyIfAbsent
public long removeKeyIfAbsent(byte key, long value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableByteLongMap
-
getIfAbsentPut
public long getIfAbsentPut(byte key, long value)
- Specified by:
getIfAbsentPut
in interfaceMutableByteLongMap
-
getAndPut
public long getAndPut(byte key, long putValue, long defaultValue)
- Specified by:
getAndPut
in interfaceMutableByteLongMap
-
getIfAbsentPut
public long getIfAbsentPut(byte key, LongFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableByteLongMap
-
getIfAbsentPutWith
public <P> long getIfAbsentPutWith(byte key, LongFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableByteLongMap
-
getIfAbsentPutWithKey
public long getIfAbsentPutWithKey(byte key, ByteToLongFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableByteLongMap
-
addToValue
public long addToValue(byte key, long toBeAdded)
- Specified by:
addToValue
in interfaceMutableByteLongMap
-
updateValue
public long updateValue(byte key, long initialValueIfAbsent, LongToLongFunction function)
- Specified by:
updateValue
in interfaceMutableByteLongMap
-
withKeyValue
public ByteLongHashMap withKeyValue(byte key1, long value1)
- Specified by:
withKeyValue
in interfaceMutableByteLongMap
-
withKeysValues
public ByteLongHashMap withKeysValues(byte key1, long value1, byte key2, long value2)
-
withKeysValues
public ByteLongHashMap withKeysValues(byte key1, long value1, byte key2, long value2, byte key3, long value3)
-
withKeysValues
public ByteLongHashMap withKeysValues(byte key1, long value1, byte key2, long value2, byte key3, long value3, byte key4, long value4)
-
withoutKey
public ByteLongHashMap withoutKey(byte key)
- Specified by:
withoutKey
in interfaceMutableByteLongMap
-
withoutAllKeys
public ByteLongHashMap withoutAllKeys(ByteIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableByteLongMap
-
asUnmodifiable
public MutableByteLongMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableByteLongMap
-
asSynchronized
public MutableByteLongMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableByteLongMap
-
toImmutable
public ImmutableByteLongMap toImmutable()
- Specified by:
toImmutable
in interfaceByteLongMap
-
get
public long get(byte key)
- Specified by:
get
in interfaceByteLongMap
-
getIfAbsent
public long getIfAbsent(byte key, long ifAbsent)
- Specified by:
getIfAbsent
in interfaceByteLongMap
-
getOrThrow
public long getOrThrow(byte key)
- Specified by:
getOrThrow
in interfaceByteLongMap
-
containsKey
public boolean containsKey(byte key)
- Specified by:
containsKey
in interfaceByteKeysMap
- Specified by:
containsKey
in interfaceByteLongMap
-
forEachKey
public void forEachKey(ByteProcedure procedure)
- Specified by:
forEachKey
in interfaceByteKeysMap
- Specified by:
forEachKey
in interfaceByteLongMap
-
forEachKeyValue
public void forEachKeyValue(ByteLongProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceByteLongMap
-
keysView
public LazyByteIterable keysView()
- Specified by:
keysView
in interfaceByteLongMap
-
keyValuesView
public RichIterable<ByteLongPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceByteLongMap
-
flipUniqueValues
public MutableLongByteMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceByteLongMap
- Specified by:
flipUniqueValues
in interfaceMutableByteLongMap
-
select
public ByteLongHashMap select(ByteLongPredicate predicate)
- Specified by:
select
in interfaceByteLongMap
- Specified by:
select
in interfaceMutableByteLongMap
-
reject
public ByteLongHashMap reject(ByteLongPredicate predicate)
- Specified by:
reject
in interfaceByteLongMap
- Specified by:
reject
in interfaceMutableByteLongMap
-
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 interfaceByteLongMap
-
values
public MutableLongCollection values()
- Specified by:
values
in interfaceLongValuesMap
-
-