public static class Byte2IntMaps.SingletonMap extends AbstractByte2IntMap
AbstractByte2IntMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2IntMap.BuilderCache, Byte2IntMap.Entry, Byte2IntMap.FastEntrySet, Byte2IntMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
int |
addTo(byte key,
int value)
A Helper method to add a primitives together.
|
ObjectSet<Byte2IntMap.Entry> |
byte2IntEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
int |
computeInt(byte key,
ByteIntUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
int |
computeIntIfAbsent(byte key,
Byte2IntFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
int |
computeIntIfPresent(byte key,
ByteIntUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Byte2IntMaps.SingletonMap |
copy()
A Function that does a shallow clone of the Map itself.
|
int |
get(byte key)
A Type Specific get method to reduce boxing/unboxing
|
int |
getOrDefault(byte key,
int defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ByteSet |
keySet() |
void |
mergeAllInt(Byte2IntMap m,
IntIntUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
int |
mergeInt(byte key,
int value,
IntIntUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
int |
put(byte key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
putIfAbsent(byte key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
remove(byte key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(byte key,
int value)
Type Specific remove function to reduce boxing/unboxing
|
int |
removeOrDefault(byte key,
int defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
int |
subFrom(byte key,
int value)
A Helper method to subtract from primitive from each other.
|
int |
supplyIntIfAbsent(byte key,
IntSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
IntCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceInts, replaceInts, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringbuilder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic int put(byte key,
int value)
Byte2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public int putIfAbsent(byte key,
int value)
Byte2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public int addTo(byte key,
int value)
Byte2IntMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic int subFrom(byte key,
int value)
Byte2IntMapByte2IntMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic int remove(byte key)
Byte2IntMapkey - the element that should be removedpublic int removeOrDefault(byte key,
int defaultValue)
Byte2IntMapkey - 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,
int value)
Byte2IntMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public int get(byte key)
Byte2IntMapkey - the key that is searched forpublic int getOrDefault(byte key,
int defaultValue)
Byte2IntMapgetOrDefault in interface Byte2IntMapgetOrDefault in class AbstractByte2IntMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic int computeInt(byte key,
ByteIntUnaryOperator mappingFunction)
Byte2IntMapcomputeInt in interface Byte2IntMapcomputeInt in class AbstractByte2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic int computeIntIfAbsent(byte key,
Byte2IntFunction mappingFunction)
Byte2IntMapcomputeIntIfAbsent in interface Byte2IntMapcomputeIntIfAbsent in class AbstractByte2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic int computeIntIfPresent(byte key,
ByteIntUnaryOperator mappingFunction)
Byte2IntMapcomputeIntIfPresent in interface Byte2IntMapcomputeIntIfPresent in class AbstractByte2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic int supplyIntIfAbsent(byte key,
IntSupplier valueProvider)
Byte2IntMapsupplyIntIfAbsent in interface Byte2IntMapsupplyIntIfAbsent in class AbstractByte2IntMapkey - the key that should be computedvalueProvider - the value if not presentpublic int mergeInt(byte key,
int value,
IntIntUnaryOperator mappingFunction)
Byte2IntMapmergeInt in interface Byte2IntMapmergeInt in class AbstractByte2IntMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllInt(Byte2IntMap m, IntIntUnaryOperator mappingFunction)
Byte2IntMapmergeAllInt in interface Byte2IntMapmergeAllInt in class AbstractByte2IntMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic Byte2IntMaps.SingletonMap copy()
Byte2IntMapcopy in interface Byte2IntMapcopy in class AbstractByte2IntMappublic ByteSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Integer>keySet in interface Byte2IntMapkeySet in class AbstractByte2IntMappublic IntCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Integer>values in interface Byte2IntMapvalues in class AbstractByte2IntMappublic ObjectSet<Byte2IntMap.Entry> byte2IntEntrySet()
Byte2IntMap