public static class Short2ByteMaps.UnmodifyableMap extends AbstractShort2ByteMap implements Short2ByteMap
AbstractShort2ByteMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2ByteMap.BuilderCache, Short2ByteMap.Entry, Short2ByteMap.FastEntrySet, Short2ByteMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
byte |
addTo(short key,
byte value)
A Helper method to add a primitives together.
|
void |
clear() |
byte |
computeByte(short key,
ShortByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfAbsent(short key,
Short2ByteFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
byte |
computeByteIfPresent(short key,
ShortByteUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Short2ByteMap |
copy()
A Function that does a shallow clone of the Map itself.
|
byte |
get(short key)
A Type Specific get method to reduce boxing/unboxing
|
byte |
getOrDefault(short key,
byte defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ShortSet |
keySet() |
void |
mergeAllByte(Short2ByteMap m,
ByteByteUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
byte |
mergeByte(short key,
byte value,
ByteByteUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
byte |
put(short key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
putIfAbsent(short key,
byte value)
Type Specific method to reduce boxing/unboxing of values
|
byte |
remove(short key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(short key,
byte value)
Type Specific remove function to reduce boxing/unboxing
|
byte |
removeOrDefault(short key,
byte defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
void |
replaceBytes(Short2ByteMap m)
Type-Specific bulk replace method.
|
void |
replaceBytes(ShortByteUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
ObjectSet<Short2ByteMap.Entry> |
short2ByteEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
byte |
subFrom(short key,
byte value)
A Helper method to subtract from primitive from each other.
|
byte |
supplyByteIfAbsent(short 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, setDefaultReturnValuecontainsKey, containsValue, isEmpty, size, toStringaddToAll, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsKey, containsValue, containsValue, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replace, replace, replaceAll, setDefaultReturnValue, synchronize, synchronize, unmodifiablepublic byte put(short key,
byte value)
Short2ByteMapput in interface Short2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public byte putIfAbsent(short key,
byte value)
Short2ByteMapputIfAbsent in interface Short2ByteMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public byte addTo(short key,
byte value)
Short2ByteMapaddTo in interface Short2ByteMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic byte subFrom(short key,
byte value)
Short2ByteMapShort2ByteMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Short2ByteMapkey - that should be subtract fromvalue - that should be subtractpublic byte remove(short key)
Short2ByteMapremove in interface Short2ByteMapkey - the element that should be removedpublic byte removeOrDefault(short key,
byte defaultValue)
Short2ByteMapremoveOrDefault in interface Short2ByteMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(short key,
byte value)
Short2ByteMapremove in interface Short2ByteMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public byte get(short key)
Short2ByteMapget in interface Short2ByteFunctionget in interface Short2ByteMapkey - the key that is searched forpublic byte getOrDefault(short key,
byte defaultValue)
Short2ByteMapgetOrDefault in interface Short2ByteMapgetOrDefault in class AbstractShort2ByteMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic byte computeByte(short key,
ShortByteUnaryOperator mappingFunction)
Short2ByteMapcomputeByte in interface Short2ByteMapcomputeByte in class AbstractShort2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic byte computeByteIfAbsent(short key,
Short2ByteFunction mappingFunction)
Short2ByteMapcomputeByteIfAbsent in interface Short2ByteMapcomputeByteIfAbsent in class AbstractShort2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic byte computeByteIfPresent(short key,
ShortByteUnaryOperator mappingFunction)
Short2ByteMapcomputeByteIfPresent in interface Short2ByteMapcomputeByteIfPresent in class AbstractShort2ByteMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic byte supplyByteIfAbsent(short key,
ByteSupplier valueProvider)
Short2ByteMapsupplyByteIfAbsent in interface Short2ByteMapsupplyByteIfAbsent in class AbstractShort2ByteMapkey - the key that should be computedvalueProvider - the value if not presentpublic byte mergeByte(short key,
byte value,
ByteByteUnaryOperator mappingFunction)
Short2ByteMapmergeByte in interface Short2ByteMapmergeByte in class AbstractShort2ByteMapkey - 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(Short2ByteMap m, ByteByteUnaryOperator mappingFunction)
Short2ByteMapmergeAllByte in interface Short2ByteMapmergeAllByte in class AbstractShort2ByteMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void replaceBytes(ShortByteUnaryOperator mappingFunction)
Short2ByteMapreplaceBytes in interface Short2ByteMapreplaceBytes in class AbstractShort2ByteMapmappingFunction - operation to replace all valuespublic void replaceBytes(Short2ByteMap m)
Short2ByteMapreplaceBytes in interface Short2ByteMapreplaceBytes in class AbstractShort2ByteMapm - elements that should be replaced.public Short2ByteMap copy()
Short2ByteMapcopy in interface Short2ByteMapcopy in class AbstractShort2ByteMappublic void clear()
clear in interface java.util.Map<java.lang.Short,java.lang.Byte>clear in class java.util.AbstractMap<java.lang.Short,java.lang.Byte>public ShortSet keySet()
keySet in interface java.util.Map<java.lang.Short,java.lang.Byte>keySet in interface Short2ByteMapkeySet in class AbstractShort2ByteMappublic ByteCollection values()
values in interface java.util.Map<java.lang.Short,java.lang.Byte>values in interface Short2ByteMapvalues in class AbstractShort2ByteMappublic ObjectSet<Short2ByteMap.Entry> short2ByteEntrySet()
Short2ByteMapshort2ByteEntrySet in interface Short2ByteMap