public static class Byte2ShortMaps.UnmodifyableMap extends AbstractByte2ShortMap implements Byte2ShortMap
AbstractByte2ShortMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Byte2ShortMap.BuilderCache, Byte2ShortMap.Entry, Byte2ShortMap.FastEntrySet, Byte2ShortMap.MapBuilder| 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.
|
void |
clear() |
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
|
Byte2ShortMap |
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.
|
void |
replaceShorts(Byte2ShortMap m)
Type-Specific bulk replace method.
|
void |
replaceShorts(ByteShortUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
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, setDefaultReturnValuecontainsKey, containsValue, isEmpty, size, toStringaddToAll, applyAsShort, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsKey, containsValue, containsValue, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replace, replace, replaceAll, setDefaultReturnValue, synchronize, synchronize, unmodifiablepublic short put(byte key,
short value)
Byte2ShortMapput in interface Byte2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public short putIfAbsent(byte key,
short value)
Byte2ShortMapputIfAbsent in interface Byte2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public short addTo(byte key,
short value)
Byte2ShortMapaddTo in interface 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 removedsubFrom in interface Byte2ShortMapkey - that should be subtract fromvalue - that should be subtractpublic short remove(byte key)
Byte2ShortMapremove in interface Byte2ShortMapkey - the element that should be removedpublic short removeOrDefault(byte key,
short defaultValue)
Byte2ShortMapremoveOrDefault in interface 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)
Byte2ShortMapremove in interface Byte2ShortMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public short get(byte key)
Byte2ShortMapget in interface 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 void replaceShorts(ByteShortUnaryOperator mappingFunction)
Byte2ShortMapreplaceShorts in interface Byte2ShortMapreplaceShorts in class AbstractByte2ShortMapmappingFunction - operation to replace all valuespublic void replaceShorts(Byte2ShortMap m)
Byte2ShortMapreplaceShorts in interface Byte2ShortMapreplaceShorts in class AbstractByte2ShortMapm - elements that should be replaced.public Byte2ShortMap copy()
Byte2ShortMapcopy in interface Byte2ShortMapcopy in class AbstractByte2ShortMappublic void clear()
clear in interface java.util.Map<java.lang.Byte,java.lang.Short>clear in class java.util.AbstractMap<java.lang.Byte,java.lang.Short>public 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()
Byte2ShortMapbyte2ShortEntrySet in interface Byte2ShortMap