public static class Byte2LongMaps.EmptyMap extends AbstractByte2LongMap
AbstractByte2LongMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2LongMap.BuilderCache, Byte2LongMap.Entry, Byte2LongMap.FastEntrySet, Byte2LongMap.MapBuilder| Constructor and Description |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
long |
addTo(byte key,
long value)
A Helper method to add a primitives together.
|
ObjectSet<Byte2LongMap.Entry> |
byte2LongEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
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
|
Byte2LongMaps.EmptyMap |
copy()
A Function that does a shallow clone of the Map itself.
|
long |
get(byte key)
A Type Specific get method to reduce boxing/unboxing
|
long |
getOrDefault(byte key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
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
|
long |
put(byte key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
putIfAbsent(byte key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
remove(byte key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(byte key,
long value)
Type Specific remove function to reduce boxing/unboxing
|
long |
removeOrDefault(byte key,
long defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
long |
subFrom(byte key,
long value)
A Helper method to subtract from primitive from each other.
|
long |
supplyLongIfAbsent(byte key,
LongSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
LongCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceLongs, replaceLongs, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringbuilder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic long put(byte key,
long value)
Byte2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public long putIfAbsent(byte key,
long value)
Byte2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public long addTo(byte key,
long value)
Byte2LongMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic long subFrom(byte key,
long value)
Byte2LongMapByte2LongMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic long remove(byte key)
Byte2LongMapkey - the element that should be removedpublic long removeOrDefault(byte key,
long defaultValue)
Byte2LongMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(byte key,
long value)
Byte2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public long get(byte key)
Byte2LongMapkey - the key that is searched forpublic long getOrDefault(byte key,
long defaultValue)
Byte2LongMapgetOrDefault in interface Byte2LongMapgetOrDefault in class AbstractByte2LongMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic long computeLong(byte key,
ByteLongUnaryOperator mappingFunction)
Byte2LongMapcomputeLong in interface Byte2LongMapcomputeLong in class AbstractByte2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic long computeLongIfAbsent(byte key,
Byte2LongFunction mappingFunction)
Byte2LongMapcomputeLongIfAbsent in interface Byte2LongMapcomputeLongIfAbsent in class AbstractByte2LongMapkey - 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 Byte2LongMapcomputeLongIfPresent in class AbstractByte2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic long supplyLongIfAbsent(byte key,
LongSupplier valueProvider)
Byte2LongMapsupplyLongIfAbsent in interface Byte2LongMapsupplyLongIfAbsent in class AbstractByte2LongMapkey - the key that should be computedvalueProvider - the value if not presentpublic long mergeLong(byte key,
long value,
LongLongUnaryOperator mappingFunction)
Byte2LongMapmergeLong in interface Byte2LongMapmergeLong in class AbstractByte2LongMapkey - 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 Byte2LongMapmergeAllLong in class AbstractByte2LongMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic ByteSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Long>keySet in interface Byte2LongMapkeySet in class AbstractByte2LongMappublic LongCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Long>values in interface Byte2LongMapvalues in class AbstractByte2LongMappublic ObjectSet<Byte2LongMap.Entry> byte2LongEntrySet()
Byte2LongMappublic Byte2LongMaps.EmptyMap copy()
Byte2LongMapcopy in interface Byte2LongMapcopy in class AbstractByte2LongMap