public static class Int2ShortMaps.UnmodifyableMap extends AbstractInt2ShortMap implements Int2ShortMap
AbstractInt2ShortMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2ShortMap.BuilderCache, Int2ShortMap.Entry, Int2ShortMap.FastEntrySet, Int2ShortMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
short |
addTo(int key,
short value)
A Helper method to add a primitives together.
|
void |
clear() |
short |
computeShort(int key,
IntShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfAbsent(int key,
Int2ShortFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfPresent(int key,
IntShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Int2ShortMap |
copy()
A Function that does a shallow clone of the Map itself.
|
short |
get(int key)
A Type Specific get method to reduce boxing/unboxing
|
short |
getOrDefault(int key,
short defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<Int2ShortMap.Entry> |
int2ShortEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
IntSet |
keySet() |
void |
mergeAllShort(Int2ShortMap m,
ShortShortUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
short |
mergeShort(int key,
short value,
ShortShortUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
short |
put(int key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
putIfAbsent(int key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
remove(int key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(int key,
short value)
Type Specific remove function to reduce boxing/unboxing
|
short |
removeOrDefault(int key,
short defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
void |
replaceShorts(Int2ShortMap m)
Type-Specific bulk replace method.
|
void |
replaceShorts(IntShortUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
short |
subFrom(int key,
short value)
A Helper method to subtract from primitive from each other.
|
short |
supplyShortIfAbsent(int 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, 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 short put(int key,
short value)
Int2ShortMapput in interface Int2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public short putIfAbsent(int key,
short value)
Int2ShortMapputIfAbsent in interface Int2ShortMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public short addTo(int key,
short value)
Int2ShortMapaddTo in interface Int2ShortMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic short subFrom(int key,
short value)
Int2ShortMapInt2ShortMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Int2ShortMapkey - that should be subtract fromvalue - that should be subtractpublic short remove(int key)
Int2ShortMapremove in interface Int2ShortMapkey - the element that should be removedpublic short removeOrDefault(int key,
short defaultValue)
Int2ShortMapremoveOrDefault in interface Int2ShortMapkey - 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,
short value)
Int2ShortMapremove in interface Int2ShortMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public short get(int key)
Int2ShortMapget in interface Int2ShortFunctionget in interface Int2ShortMapkey - the key that is searched forpublic short getOrDefault(int key,
short defaultValue)
Int2ShortMapgetOrDefault in interface Int2ShortMapgetOrDefault in class AbstractInt2ShortMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic short computeShort(int key,
IntShortUnaryOperator mappingFunction)
Int2ShortMapcomputeShort in interface Int2ShortMapcomputeShort in class AbstractInt2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic short computeShortIfAbsent(int key,
Int2ShortFunction mappingFunction)
Int2ShortMapcomputeShortIfAbsent in interface Int2ShortMapcomputeShortIfAbsent in class AbstractInt2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic short computeShortIfPresent(int key,
IntShortUnaryOperator mappingFunction)
Int2ShortMapcomputeShortIfPresent in interface Int2ShortMapcomputeShortIfPresent in class AbstractInt2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic short supplyShortIfAbsent(int key,
ShortSupplier valueProvider)
Int2ShortMapsupplyShortIfAbsent in interface Int2ShortMapsupplyShortIfAbsent in class AbstractInt2ShortMapkey - the key that should be computedvalueProvider - the value if not presentpublic short mergeShort(int key,
short value,
ShortShortUnaryOperator mappingFunction)
Int2ShortMapmergeShort in interface Int2ShortMapmergeShort in class AbstractInt2ShortMapkey - 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(Int2ShortMap m, ShortShortUnaryOperator mappingFunction)
Int2ShortMapmergeAllShort in interface Int2ShortMapmergeAllShort in class AbstractInt2ShortMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void replaceShorts(IntShortUnaryOperator mappingFunction)
Int2ShortMapreplaceShorts in interface Int2ShortMapreplaceShorts in class AbstractInt2ShortMapmappingFunction - operation to replace all valuespublic void replaceShorts(Int2ShortMap m)
Int2ShortMapreplaceShorts in interface Int2ShortMapreplaceShorts in class AbstractInt2ShortMapm - elements that should be replaced.public Int2ShortMap copy()
Int2ShortMapcopy in interface Int2ShortMapcopy in class AbstractInt2ShortMappublic void clear()
clear in interface java.util.Map<java.lang.Integer,java.lang.Short>clear in class java.util.AbstractMap<java.lang.Integer,java.lang.Short>public IntSet keySet()
keySet in interface java.util.Map<java.lang.Integer,java.lang.Short>keySet in interface Int2ShortMapkeySet in class AbstractInt2ShortMappublic ShortCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Short>values in interface Int2ShortMapvalues in class AbstractInt2ShortMappublic ObjectSet<Int2ShortMap.Entry> int2ShortEntrySet()
Int2ShortMapint2ShortEntrySet in interface Int2ShortMap