public abstract class AbstractByte2LongMap extends java.util.AbstractMap<java.lang.Byte,java.lang.Long> implements Byte2LongMap
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractByte2LongMap.BasicEntry
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2LongMap.Entry, Byte2LongMap.FastEntrySet| Constructor and Description |
|---|
AbstractByte2LongMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAll(Byte2LongMap m)
A Helper method to bulk add primitives together.
|
long |
computeLong(byte key,
ByteLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfAbsent(byte key,
Byte2LongFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfPresent(byte key,
ByteLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(byte key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(long value)
Type Specific method to reduce boxing/unboxing of values
|
ObjectSet<java.util.Map.Entry<java.lang.Byte,java.lang.Long>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(ByteLongConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Long |
get(java.lang.Object key) |
long |
getDefaultReturnValue()
Method to see what the default return value is.
|
long |
getOrDefault(byte key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
java.lang.Long |
getOrDefault(java.lang.Object key,
java.lang.Long defaultValue) |
int |
hashCode() |
ByteSet |
keySet() |
void |
mergeAllLong(Byte2LongMap m,
LongLongUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
long |
mergeLong(byte key,
long value,
LongLongUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
putAll(byte[] keys,
long[] values,
int offset,
int size)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(Byte2LongMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Byte,? extends java.lang.Long> m) |
void |
putAllIfAbsent(Byte2LongMap m)
Type-Specific bulk put method put elements into the map if not present.
|
long |
replace(byte key,
long value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(byte key,
long oldValue,
long newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceLongs(Byte2LongMap m)
Type-Specific bulk replace method.
|
void |
replaceLongs(ByteLongUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractByte2LongMap |
setDefaultReturnValue(long v)
Method to define the default return value if a requested key isn't present
|
LongCollection |
values() |
clear, containsKey, containsValue, isEmpty, put, remove, size, toStringaddTo, byte2LongEntrySet, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, getLong, merge, put, put, putAll, putIfAbsent, putIfAbsent, remByte, remByteOrDefault, remove, remove, remove, replace, replace, replaceAllpublic long getDefaultReturnValue()
Byte2LongMapgetDefaultReturnValue in interface Byte2LongMappublic AbstractByte2LongMap setDefaultReturnValue(long v)
Byte2LongMapsetDefaultReturnValue in interface Byte2LongMapv - value that should be the default return valuepublic void addToAll(Byte2LongMap m)
Byte2LongMapaddToAll in interface Byte2LongMapm - the values that should be added/insertedpublic void putAll(Byte2LongMap m)
Byte2LongMapputAll in interface Byte2LongMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Byte,? extends java.lang.Long> m)
putAll in interface java.util.Map<java.lang.Byte,java.lang.Long>putAll in class java.util.AbstractMap<java.lang.Byte,java.lang.Long>public void putAll(byte[] keys,
long[] values,
int offset,
int size)
Byte2LongMapputAll in interface Byte2LongMapkeys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedMap.putAll(Map)public void putAllIfAbsent(Byte2LongMap m)
Byte2LongMapputAllIfAbsent in interface Byte2LongMapm - elements that should be added if not present.public boolean containsKey(byte key)
Byte2LongMapcontainsKey in interface Byte2LongMapkey - element that is searched forpublic boolean containsValue(long value)
Byte2LongMapcontainsValue in interface Byte2LongMapvalue - element that is searched forpublic boolean replace(byte key,
long oldValue,
long newValue)
Byte2LongMapreplace in interface Byte2LongMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public long replace(byte key,
long value)
Byte2LongMapreplace in interface Byte2LongMapkey - the element that should be searched forvalue - the value to replace with.public void replaceLongs(Byte2LongMap m)
Byte2LongMapreplaceLongs in interface Byte2LongMapm - elements that should be replaced.public void replaceLongs(ByteLongUnaryOperator mappingFunction)
Byte2LongMapreplaceLongs in interface Byte2LongMapmappingFunction - operation to replace all valuespublic long computeLong(byte key,
ByteLongUnaryOperator mappingFunction)
Byte2LongMapcomputeLong in interface Byte2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic long computeLongIfAbsent(byte key,
Byte2LongFunction mappingFunction)
Byte2LongMapcomputeLongIfAbsent in interface Byte2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic long computeLongIfPresent(byte key,
ByteLongUnaryOperator mappingFunction)
Byte2LongMapcomputeLongIfPresent in interface Byte2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic long mergeLong(byte key,
long value,
LongLongUnaryOperator mappingFunction)
Byte2LongMapmergeLong in interface Byte2LongMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllLong(Byte2LongMap m, LongLongUnaryOperator mappingFunction)
Byte2LongMapmergeAllLong in interface Byte2LongMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic java.lang.Long get(java.lang.Object key)
get in interface java.util.Map<java.lang.Byte,java.lang.Long>get in interface Byte2LongMapget in class java.util.AbstractMap<java.lang.Byte,java.lang.Long>public java.lang.Long getOrDefault(java.lang.Object key,
java.lang.Long defaultValue)
getOrDefault in interface java.util.Map<java.lang.Byte,java.lang.Long>getOrDefault in interface Byte2LongMappublic long getOrDefault(byte key,
long defaultValue)
Byte2LongMapgetOrDefault in interface Byte2LongMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(ByteLongConsumer action)
Byte2LongMapforEach in interface Byte2LongMapaction - processor of the values that are iterator overpublic ByteSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Long>keySet in interface Byte2LongMapkeySet in class java.util.AbstractMap<java.lang.Byte,java.lang.Long>public LongCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Long>values in interface Byte2LongMapvalues in class java.util.AbstractMap<java.lang.Byte,java.lang.Long>public ObjectSet<java.util.Map.Entry<java.lang.Byte,java.lang.Long>> entrySet()
entrySet in interface java.util.Map<java.lang.Byte,java.lang.Long>entrySet in interface Byte2LongMapentrySet in class java.util.AbstractMap<java.lang.Byte,java.lang.Long>public boolean equals(java.lang.Object o)
equals in interface java.util.Map<java.lang.Byte,java.lang.Long>equals in class java.util.AbstractMap<java.lang.Byte,java.lang.Long>public int hashCode()
hashCode in interface java.util.Map<java.lang.Byte,java.lang.Long>hashCode in class java.util.AbstractMap<java.lang.Byte,java.lang.Long>