T - the type of elements maintained by this Collectionpublic static class Object2ByteMaps.SingletonMap<T> extends AbstractObject2ByteMap<T>
AbstractObject2ByteMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2ByteMap.BuilderCache<T>, Object2ByteMap.Entry<T>, Object2ByteMap.FastEntrySet<T>, Object2ByteMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
byte |
addTo(T key,
byte value)
A Helper method to add a primitives together.
|
byte |
computeByte(T key,
ObjectByteUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfAbsent(T key,
Object2ByteFunction<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfPresent(T key,
ObjectByteUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Object2ByteMaps.SingletonMap<T> |
copy()
A Function that does a shallow clone of the Map itself.
|
byte |
getByte(T key)
A Type Specific get method to reduce boxing/unboxing
|
byte |
getOrDefault(T key,
byte defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<T> |
keySet() |
void |
mergeAllByte(Object2ByteMap<T> m,
ByteByteUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
byte |
mergeByte(T key,
byte value,
ByteByteUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
ObjectSet<Object2ByteMap.Entry<T>> |
object2ByteEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
byte |
put(T key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
putIfAbsent(T key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
byte |
remOrDefault(T key,
byte defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(T key,
byte value)
Type Specific remove function to reduce boxing/unboxing
|
byte |
subFrom(T key,
byte value)
A Helper method to subtract from primitive from each other.
|
byte |
supplyByteIfAbsent(T 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, setDefaultReturnValuebuilder, compute, computeIfAbsent, computeIfPresent, containsValue, forEach, merge, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic byte put(T key, byte value)
Object2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public byte putIfAbsent(T key, byte value)
Object2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public byte addTo(T key, byte value)
Object2ByteMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic byte subFrom(T key, byte value)
Object2ByteMapObject2ByteMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic byte rem(T key)
Object2ByteMapkey - the element that should be removedpublic byte remOrDefault(T key, byte defaultValue)
Object2ByteMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(T key, byte value)
Object2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public byte getByte(T key)
Object2ByteMapkey - the key that is searched forpublic byte getOrDefault(T key, byte defaultValue)
Object2ByteMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic byte computeByte(T key, ObjectByteUnaryOperator<T> mappingFunction)
Object2ByteMapcomputeByte in interface Object2ByteMap<T>computeByte in class AbstractObject2ByteMap<T>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic byte computeByteIfAbsent(T key, Object2ByteFunction<T> mappingFunction)
Object2ByteMapcomputeByteIfAbsent in interface Object2ByteMap<T>computeByteIfAbsent in class AbstractObject2ByteMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic byte computeByteIfPresent(T key, ObjectByteUnaryOperator<T> mappingFunction)
Object2ByteMapcomputeByteIfPresent in interface Object2ByteMap<T>computeByteIfPresent in class AbstractObject2ByteMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic byte supplyByteIfAbsent(T key, ByteSupplier valueProvider)
Object2ByteMapsupplyByteIfAbsent in interface Object2ByteMap<T>supplyByteIfAbsent in class AbstractObject2ByteMap<T>key - the key that should be computedvalueProvider - the value if not presentpublic byte mergeByte(T key, byte value, ByteByteUnaryOperator mappingFunction)
Object2ByteMapmergeByte in interface Object2ByteMap<T>mergeByte in class AbstractObject2ByteMap<T>key - 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(Object2ByteMap<T> m, ByteByteUnaryOperator mappingFunction)
Object2ByteMapmergeAllByte in interface Object2ByteMap<T>mergeAllByte in class AbstractObject2ByteMap<T>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic Object2ByteMaps.SingletonMap<T> copy()
Object2ByteMapcopy in interface Object2ByteMap<T>copy in class AbstractObject2ByteMap<T>public ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Byte>keySet in interface Object2ByteMap<T>keySet in class AbstractObject2ByteMap<T>public ByteCollection values()
values in interface java.util.Map<T,java.lang.Byte>values in interface Object2ByteMap<T>values in class AbstractObject2ByteMap<T>public ObjectSet<Object2ByteMap.Entry<T>> object2ByteEntrySet()
Object2ByteMap