public static class Byte2ShortMaps.EmptyMap extends AbstractByte2ShortMap
AbstractByte2ShortMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2ShortMap.BuilderCache, Byte2ShortMap.Entry, Byte2ShortMap.FastEntrySet, Byte2ShortMap.MapBuilder| Constructor and Description |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
short |
addTo(byte key,
short value)
A Helper method to add a primitives together.
|
ObjectSet<Byte2ShortMap.Entry> |
byte2ShortEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
short |
computeShort(byte key,
ByteShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfAbsent(byte key,
Byte2ShortFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfPresent(byte key,
ByteShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Byte2ShortMaps.EmptyMap |
copy()
A Function that does a shallow clone of the Map itself.
|
short |
get(byte key)
A Type Specific get method to reduce boxing/unboxing
|
short |
getOrDefault(byte key,
short defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ByteSet |
keySet() |
void |
mergeAllShort(Byte2ShortMap m,
ShortShortUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
short |
mergeShort(byte key,
short value,
ShortShortUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
short |
put(byte key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
putIfAbsent(byte key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
remove(byte key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(byte key,
short value)
Type Specific remove function to reduce boxing/unboxing
|
short |
removeOrDefault(byte key,
short defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
short |
subFrom(byte key,
short value)
A Helper method to subtract from primitive from each other.
|
short |
supplyShortIfAbsent(byte key,
ShortSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ShortCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceShorts, replaceShorts, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringapplyAsShort, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, put, put, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic short put(byte key,
short value)
Byte2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public short putIfAbsent(byte key,
short value)
Byte2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public short addTo(byte key,
short value)
Byte2ShortMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic short subFrom(byte key,
short value)
Byte2ShortMapByte2ShortMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic short remove(byte key)
Byte2ShortMapkey - the element that should be removedpublic short removeOrDefault(byte key,
short defaultValue)
Byte2ShortMapkey - 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,
short value)
Byte2ShortMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public short get(byte key)
Byte2ShortMapkey - the key that is searched forpublic short getOrDefault(byte key,
short defaultValue)
Byte2ShortMapgetOrDefault in interface Byte2ShortMapgetOrDefault in class AbstractByte2ShortMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic short computeShort(byte key,
ByteShortUnaryOperator mappingFunction)
Byte2ShortMapcomputeShort in interface Byte2ShortMapcomputeShort in class AbstractByte2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic short computeShortIfAbsent(byte key,
Byte2ShortFunction mappingFunction)
Byte2ShortMapcomputeShortIfAbsent in interface Byte2ShortMapcomputeShortIfAbsent in class AbstractByte2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic short computeShortIfPresent(byte key,
ByteShortUnaryOperator mappingFunction)
Byte2ShortMapcomputeShortIfPresent in interface Byte2ShortMapcomputeShortIfPresent in class AbstractByte2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic short supplyShortIfAbsent(byte key,
ShortSupplier valueProvider)
Byte2ShortMapsupplyShortIfAbsent in interface Byte2ShortMapsupplyShortIfAbsent in class AbstractByte2ShortMapkey - the key that should be computedvalueProvider - the value if not presentpublic short mergeShort(byte key,
short value,
ShortShortUnaryOperator mappingFunction)
Byte2ShortMapmergeShort in interface Byte2ShortMapmergeShort in class AbstractByte2ShortMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllShort(Byte2ShortMap m, ShortShortUnaryOperator mappingFunction)
Byte2ShortMapmergeAllShort in interface Byte2ShortMapmergeAllShort in class AbstractByte2ShortMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic ByteSet keySet()
keySet in interface java.util.Map<java.lang.Byte,java.lang.Short>keySet in interface Byte2ShortMapkeySet in class AbstractByte2ShortMappublic ShortCollection values()
values in interface java.util.Map<java.lang.Byte,java.lang.Short>values in interface Byte2ShortMapvalues in class AbstractByte2ShortMappublic ObjectSet<Byte2ShortMap.Entry> byte2ShortEntrySet()
Byte2ShortMappublic Byte2ShortMaps.EmptyMap copy()
Byte2ShortMapcopy in interface Byte2ShortMapcopy in class AbstractByte2ShortMap