public static class Long2ByteMaps.EmptyMap extends AbstractLong2ByteMap
AbstractLong2ByteMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2ByteMap.BuilderCache, Long2ByteMap.Entry, Long2ByteMap.FastEntrySet, Long2ByteMap.MapBuilder| Constructor and Description |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
byte |
addTo(long key,
byte value)
A Helper method to add a primitives together.
|
byte |
computeByte(long key,
LongByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfAbsent(long key,
Long2ByteFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfPresent(long key,
LongByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Long2ByteMaps.EmptyMap |
copy()
A Function that does a shallow clone of the Map itself.
|
byte |
get(long key)
A Type Specific get method to reduce boxing/unboxing
|
byte |
getOrDefault(long key,
byte defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
LongSet |
keySet() |
ObjectSet<Long2ByteMap.Entry> |
long2ByteEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
mergeAllByte(Long2ByteMap m,
ByteByteUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
byte |
mergeByte(long key,
byte value,
ByteByteUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
byte |
put(long key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
putIfAbsent(long key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
remove(long key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(long key,
byte value)
Type Specific remove function to reduce boxing/unboxing
|
byte |
removeOrDefault(long key,
byte defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
byte |
subFrom(long key,
byte value)
A Helper method to subtract from primitive from each other.
|
byte |
supplyByteIfAbsent(long key,
ByteSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ByteCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceBytes, replaceBytes, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringbuilder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic byte put(long key,
byte value)
Long2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public byte putIfAbsent(long key,
byte value)
Long2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public byte addTo(long key,
byte value)
Long2ByteMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic byte subFrom(long key,
byte value)
Long2ByteMapLong2ByteMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic byte remove(long key)
Long2ByteMapkey - the element that should be removedpublic byte removeOrDefault(long key,
byte defaultValue)
Long2ByteMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(long key,
byte value)
Long2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public byte get(long key)
Long2ByteMapkey - the key that is searched forpublic byte getOrDefault(long key,
byte defaultValue)
Long2ByteMapgetOrDefault in interface Long2ByteMapgetOrDefault in class AbstractLong2ByteMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic byte computeByte(long key,
LongByteUnaryOperator mappingFunction)
Long2ByteMapcomputeByte in interface Long2ByteMapcomputeByte in class AbstractLong2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic byte computeByteIfAbsent(long key,
Long2ByteFunction mappingFunction)
Long2ByteMapcomputeByteIfAbsent in interface Long2ByteMapcomputeByteIfAbsent in class AbstractLong2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic byte computeByteIfPresent(long key,
LongByteUnaryOperator mappingFunction)
Long2ByteMapcomputeByteIfPresent in interface Long2ByteMapcomputeByteIfPresent in class AbstractLong2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic byte supplyByteIfAbsent(long key,
ByteSupplier valueProvider)
Long2ByteMapsupplyByteIfAbsent in interface Long2ByteMapsupplyByteIfAbsent in class AbstractLong2ByteMapkey - the key that should be computedvalueProvider - the value if not presentpublic byte mergeByte(long key,
byte value,
ByteByteUnaryOperator mappingFunction)
Long2ByteMapmergeByte in interface Long2ByteMapmergeByte in class AbstractLong2ByteMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllByte(Long2ByteMap m, ByteByteUnaryOperator mappingFunction)
Long2ByteMapmergeAllByte in interface Long2ByteMapmergeAllByte in class AbstractLong2ByteMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic LongSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Byte>keySet in interface Long2ByteMapkeySet in class AbstractLong2ByteMappublic ByteCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Byte>values in interface Long2ByteMapvalues in class AbstractLong2ByteMappublic ObjectSet<Long2ByteMap.Entry> long2ByteEntrySet()
Long2ByteMappublic Long2ByteMaps.EmptyMap copy()
Long2ByteMapcopy in interface Long2ByteMapcopy in class AbstractLong2ByteMap