public static class Int2ByteMaps.SingletonMap extends AbstractInt2ByteMap
AbstractInt2ByteMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2ByteMap.BuilderCache, Int2ByteMap.Entry, Int2ByteMap.FastEntrySet, Int2ByteMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
byte |
addTo(int key,
byte value)
A Helper method to add a primitives together.
|
byte |
computeByte(int key,
IntByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfAbsent(int key,
Int2ByteFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfPresent(int key,
IntByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Int2ByteMaps.SingletonMap |
copy()
A Function that does a shallow clone of the Map itself.
|
byte |
get(int key)
A Type Specific get method to reduce boxing/unboxing
|
byte |
getOrDefault(int key,
byte defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<Int2ByteMap.Entry> |
int2ByteEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
IntSet |
keySet() |
void |
mergeAllByte(Int2ByteMap m,
ByteByteUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
byte |
mergeByte(int key,
byte value,
ByteByteUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
byte |
put(int key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
putIfAbsent(int key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
remove(int key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(int key,
byte value)
Type Specific remove function to reduce boxing/unboxing
|
byte |
removeOrDefault(int key,
byte defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
byte |
subFrom(int key,
byte value)
A Helper method to subtract from primitive from each other.
|
byte |
supplyByteIfAbsent(int 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, unmodifiablepublic byte put(int key,
byte value)
Int2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public byte putIfAbsent(int key,
byte value)
Int2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public byte addTo(int key,
byte value)
Int2ByteMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic byte subFrom(int key,
byte value)
Int2ByteMapInt2ByteMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic byte remove(int key)
Int2ByteMapkey - the element that should be removedpublic byte removeOrDefault(int key,
byte defaultValue)
Int2ByteMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(int key,
byte value)
Int2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public byte get(int key)
Int2ByteMapkey - the key that is searched forpublic byte getOrDefault(int key,
byte defaultValue)
Int2ByteMapgetOrDefault in interface Int2ByteMapgetOrDefault in class AbstractInt2ByteMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic byte computeByte(int key,
IntByteUnaryOperator mappingFunction)
Int2ByteMapcomputeByte in interface Int2ByteMapcomputeByte in class AbstractInt2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic byte computeByteIfAbsent(int key,
Int2ByteFunction mappingFunction)
Int2ByteMapcomputeByteIfAbsent in interface Int2ByteMapcomputeByteIfAbsent in class AbstractInt2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic byte computeByteIfPresent(int key,
IntByteUnaryOperator mappingFunction)
Int2ByteMapcomputeByteIfPresent in interface Int2ByteMapcomputeByteIfPresent in class AbstractInt2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic byte supplyByteIfAbsent(int key,
ByteSupplier valueProvider)
Int2ByteMapsupplyByteIfAbsent in interface Int2ByteMapsupplyByteIfAbsent in class AbstractInt2ByteMapkey - the key that should be computedvalueProvider - the value if not presentpublic byte mergeByte(int key,
byte value,
ByteByteUnaryOperator mappingFunction)
Int2ByteMapmergeByte in interface Int2ByteMapmergeByte in class AbstractInt2ByteMapkey - 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(Int2ByteMap m, ByteByteUnaryOperator mappingFunction)
Int2ByteMapmergeAllByte in interface Int2ByteMapmergeAllByte in class AbstractInt2ByteMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic Int2ByteMaps.SingletonMap copy()
Int2ByteMapcopy in interface Int2ByteMapcopy in class AbstractInt2ByteMappublic IntSet keySet()
keySet in interface java.util.Map<java.lang.Integer,java.lang.Byte>keySet in interface Int2ByteMapkeySet in class AbstractInt2ByteMappublic ByteCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Byte>values in interface Int2ByteMapvalues in class AbstractInt2ByteMappublic ObjectSet<Int2ByteMap.Entry> int2ByteEntrySet()
Int2ByteMap