public static class Byte2ByteMaps.UnmodifyableMap extends AbstractByte2ByteMap implements Byte2ByteMap
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.
|
void |
clear() |
byte |
computeByte(byte key,
ByteByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfAbsent(byte key,
Byte2ByteFunction 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
|
Byte2ByteMap |
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.
|
void |
replaceBytes(Byte2ByteMap m)
Type-Specific bulk replace method.
|
void |
replaceBytes(ByteByteUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
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, setDefaultReturnValuecontainsKey, containsValue, isEmpty, size, toStringaddToAll, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsKey, containsValue, containsValue, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replace, replace, replaceAll, setDefaultReturnValue, synchronize, synchronize, unmodifiablepublic byte put(byte key,
byte value)
Byte2ByteMapput in interface Byte2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public byte putIfAbsent(byte key,
byte value)
Byte2ByteMapputIfAbsent in interface Byte2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public byte addTo(byte key,
byte value)
Byte2ByteMapaddTo in interface 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 removedsubFrom in interface Byte2ByteMapkey - that should be subtract fromvalue - that should be subtractpublic byte remove(byte key)
Byte2ByteMapremove in interface Byte2ByteMapkey - the element that should be removedpublic byte removeOrDefault(byte key,
byte defaultValue)
Byte2ByteMapremoveOrDefault in interface 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)
Byte2ByteMapremove in interface Byte2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public byte get(byte key)
Byte2ByteMapget in interface Byte2ByteFunctionget in interface 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,
Byte2ByteFunction 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 void replaceBytes(ByteByteUnaryOperator mappingFunction)
Byte2ByteMapreplaceBytes in interface Byte2ByteMapreplaceBytes in class AbstractByte2ByteMapmappingFunction - operation to replace all valuespublic void replaceBytes(Byte2ByteMap m)
Byte2ByteMapreplaceBytes in interface Byte2ByteMapreplaceBytes in class AbstractByte2ByteMapm - elements that should be replaced.public Byte2ByteMap copy()
Byte2ByteMapcopy in interface Byte2ByteMapcopy in class AbstractByte2ByteMappublic void clear()
clear in interface java.util.Map<java.lang.Byte,java.lang.Byte>clear in class java.util.AbstractMap<java.lang.Byte,java.lang.Byte>public 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()
Byte2ByteMapbyte2ByteEntrySet in interface Byte2ByteMap