public static class Byte2ByteMaps.SingletonMap extends AbstractByte2ByteMap
AbstractByte2ByteMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2ByteMap.BuilderCache, Byte2ByteMap.Entry, Byte2ByteMap.FastEntrySet, Byte2ByteMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
byte |
addTo(byte key,
byte value)
A Helper method to add a primitives together.
|
ObjectSet<Byte2ByteMap.Entry> |
byte2ByteEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
byte |
computeByte(byte key,
ByteByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfAbsent(byte key,
ByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfPresent(byte key,
ByteByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Byte2ByteMaps.SingletonMap |
copy()
A Function that does a shallow clone of the Map itself.
|
byte |
get(byte key)
A Type Specific get method to reduce boxing/unboxing
|
byte |
getOrDefault(byte key,
byte defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ByteSet |
keySet() |
void |
mergeAllByte(Byte2ByteMap m,
ByteByteUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
byte |
mergeByte(byte key,
byte value,
ByteByteUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
byte |
put(byte key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
putIfAbsent(byte key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
remove(byte key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(byte key,
byte value)
Type Specific remove function to reduce boxing/unboxing
|
byte |
removeOrDefault(byte key,
byte defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
byte |
subFrom(byte key,
byte value)
A Helper method to subtract from primitive from each other.
|
byte |
supplyByteIfAbsent(byte 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, toStringapplyAsByte, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, put, put, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiableandThen, compose, identitypublic byte put(byte key,
byte value)
Byte2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public byte putIfAbsent(byte key,
byte value)
Byte2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public byte addTo(byte key,
byte value)
Byte2ByteMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic byte subFrom(byte key,
byte value)
Byte2ByteMapByte2ByteMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic byte remove(byte key)
Byte2ByteMapkey - the element that should be removedpublic byte removeOrDefault(byte key,
byte defaultValue)
Byte2ByteMapkey - 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,
byte value)
Byte2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public byte get(byte key)
Byte2ByteMapkey - the key that is searched forpublic byte getOrDefault(byte key,
byte defaultValue)
Byte2ByteMapgetOrDefault in interface Byte2ByteMapgetOrDefault in class AbstractByte2ByteMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic byte computeByte(byte key,
ByteByteUnaryOperator mappingFunction)
Byte2ByteMapcomputeByte in interface Byte2ByteMapcomputeByte in class AbstractByte2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic byte computeByteIfAbsent(byte key,
ByteUnaryOperator mappingFunction)
Byte2ByteMapcomputeByteIfAbsent in interface Byte2ByteMapcomputeByteIfAbsent in class AbstractByte2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic byte computeByteIfPresent(byte key,
ByteByteUnaryOperator mappingFunction)
Byte2ByteMapcomputeByteIfPresent in interface Byte2ByteMapcomputeByteIfPresent in class AbstractByte2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic byte supplyByteIfAbsent(byte key,
ByteSupplier valueProvider)
Byte2ByteMapsupplyByteIfAbsent in interface Byte2ByteMapsupplyByteIfAbsent in class AbstractByte2ByteMapkey - the key that should be computedvalueProvider - the value if not presentpublic byte mergeByte(byte key,
byte value,
ByteByteUnaryOperator mappingFunction)
Byte2ByteMapmergeByte in interface Byte2ByteMapmergeByte in class AbstractByte2ByteMapkey - 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(Byte2ByteMap m, ByteByteUnaryOperator mappingFunction)
Byte2ByteMapmergeAllByte in interface Byte2ByteMapmergeAllByte in class AbstractByte2ByteMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic Byte2ByteMaps.SingletonMap copy()
Byte2ByteMapcopy in interface Byte2ByteMapcopy in class AbstractByte2ByteMappublic ByteSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Byte>keySet in interface Byte2ByteMapkeySet in class AbstractByte2ByteMappublic ByteCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Byte>values in interface Byte2ByteMapvalues in class AbstractByte2ByteMappublic ObjectSet<Byte2ByteMap.Entry> byte2ByteEntrySet()
Byte2ByteMap