public abstract class AbstractInt2ShortMap extends java.util.AbstractMap<java.lang.Integer,java.lang.Short> implements Int2ShortMap
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractInt2ShortMap.BasicEntry
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2ShortMap.BuilderCache, Int2ShortMap.Entry, Int2ShortMap.FastEntrySet, Int2ShortMap.MapBuilder| Constructor and Description |
|---|
AbstractInt2ShortMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAll(Int2ShortMap m)
A Helper method to bulk add primitives together.
|
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
|
boolean |
containsKey(int key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(short value)
Type Specific method to reduce boxing/unboxing of values
|
Int2ShortMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<java.lang.Integer,java.lang.Short>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(IntShortConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Short |
get(java.lang.Object key) |
short |
getDefaultReturnValue()
Method to see what the default return value is.
|
short |
getOrDefault(int key,
short defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
java.lang.Short |
getOrDefault(java.lang.Object key,
java.lang.Short defaultValue) |
int |
hashCode() |
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
|
java.lang.Short |
put(java.lang.Integer key,
java.lang.Short value)
Deprecated.
|
void |
putAll(int[] keys,
short[] values,
int offset,
int size)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(Int2ShortMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.lang.Integer[] keys,
java.lang.Short[] values,
int offset,
int size)
Type Specific Object array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(java.util.Map<? extends java.lang.Integer,? extends java.lang.Short> m) |
void |
putAllIfAbsent(Int2ShortMap m)
Type-Specific bulk put method put elements into the map if not present.
|
java.lang.Short |
remove(java.lang.Object key) |
short |
replace(int key,
short value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(int key,
short oldValue,
short newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceShorts(Int2ShortMap m)
Type-Specific bulk replace method.
|
void |
replaceShorts(IntShortUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractInt2ShortMap |
setDefaultReturnValue(short v)
Method to define the default return value if a requested key isn't present
|
short |
supplyShortIfAbsent(int key,
ShortSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ShortCollection |
values() |
clear, containsKey, containsValue, isEmpty, size, toStringaddTo, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, get, int2ShortEntrySet, merge, put, putAll, putAll, putIfAbsent, putIfAbsent, remove, remove, remove, removeOrDefault, replace, replace, replaceAll, subFrom, synchronize, synchronize, unmodifiablepublic short getDefaultReturnValue()
Int2ShortMapgetDefaultReturnValue in interface Int2ShortMappublic AbstractInt2ShortMap setDefaultReturnValue(short v)
Int2ShortMapsetDefaultReturnValue in interface Int2ShortMapv - value that should be the default return valuepublic Int2ShortMap copy()
Int2ShortMapcopy in interface Int2ShortMap@Deprecated
public java.lang.Short put(java.lang.Integer key,
java.lang.Short value)
put in interface java.util.Map<java.lang.Integer,java.lang.Short>put in interface Int2ShortMapput in class java.util.AbstractMap<java.lang.Integer,java.lang.Short>public void addToAll(Int2ShortMap m)
Int2ShortMapaddToAll in interface Int2ShortMapm - the values that should be added/insertedpublic void putAll(Int2ShortMap m)
Int2ShortMapputAll in interface Int2ShortMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Integer,? extends java.lang.Short> m)
putAll in interface java.util.Map<java.lang.Integer,java.lang.Short>putAll in class java.util.AbstractMap<java.lang.Integer,java.lang.Short>public void putAll(int[] keys,
short[] values,
int offset,
int size)
Int2ShortMapputAll in interface Int2ShortMapkeys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedMap.putAll(Map)public void putAll(java.lang.Integer[] keys,
java.lang.Short[] values,
int offset,
int size)
Int2ShortMapputAll in interface Int2ShortMapkeys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedMap.putAll(Map)public void putAllIfAbsent(Int2ShortMap m)
Int2ShortMapputAllIfAbsent in interface Int2ShortMapm - elements that should be added if not present.public boolean containsKey(int key)
Int2ShortMapcontainsKey in interface Int2ShortMapkey - element that is searched forpublic boolean containsValue(short value)
Int2ShortMapcontainsValue in interface Int2ShortMapvalue - element that is searched forpublic boolean replace(int key,
short oldValue,
short newValue)
Int2ShortMapreplace in interface Int2ShortMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public short replace(int key,
short value)
Int2ShortMapreplace in interface Int2ShortMapkey - the element that should be searched forvalue - the value to replace with.public void replaceShorts(Int2ShortMap m)
Int2ShortMapreplaceShorts in interface Int2ShortMapm - elements that should be replaced.public void replaceShorts(IntShortUnaryOperator mappingFunction)
Int2ShortMapreplaceShorts in interface Int2ShortMapmappingFunction - operation to replace all valuespublic short computeShort(int key,
IntShortUnaryOperator mappingFunction)
Int2ShortMapcomputeShort in interface Int2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic short computeShortIfAbsent(int key,
Int2ShortFunction mappingFunction)
Int2ShortMapcomputeShortIfAbsent in interface Int2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic short supplyShortIfAbsent(int key,
ShortSupplier valueProvider)
Int2ShortMapsupplyShortIfAbsent in interface Int2ShortMapkey - the key that should be computedvalueProvider - the value if not presentpublic short computeShortIfPresent(int key,
IntShortUnaryOperator mappingFunction)
Int2ShortMapcomputeShortIfPresent in interface Int2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic short mergeShort(int key,
short value,
ShortShortUnaryOperator mappingFunction)
Int2ShortMapmergeShort in interface Int2ShortMapkey - 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 Int2ShortMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic java.lang.Short get(java.lang.Object key)
get in interface java.util.Map<java.lang.Integer,java.lang.Short>get in interface Int2ShortMapget in class java.util.AbstractMap<java.lang.Integer,java.lang.Short>public java.lang.Short getOrDefault(java.lang.Object key,
java.lang.Short defaultValue)
getOrDefault in interface java.util.Map<java.lang.Integer,java.lang.Short>getOrDefault in interface Int2ShortMappublic short getOrDefault(int key,
short defaultValue)
Int2ShortMapgetOrDefault in interface Int2ShortMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic java.lang.Short remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Integer,java.lang.Short>remove in interface Int2ShortMapremove in class java.util.AbstractMap<java.lang.Integer,java.lang.Short>key - the element that should be removedMap.remove(Object)public void forEach(IntShortConsumer action)
Int2ShortMapforEach in interface Int2ShortMapaction - processor of the values that are iterator overpublic IntSet keySet()
keySet in interface java.util.Map<java.lang.Integer,java.lang.Short>keySet in interface Int2ShortMapkeySet in class java.util.AbstractMap<java.lang.Integer,java.lang.Short>public ShortCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Short>values in interface Int2ShortMapvalues in class java.util.AbstractMap<java.lang.Integer,java.lang.Short>public ObjectSet<java.util.Map.Entry<java.lang.Integer,java.lang.Short>> entrySet()
entrySet in interface java.util.Map<java.lang.Integer,java.lang.Short>entrySet in interface Int2ShortMapentrySet in class java.util.AbstractMap<java.lang.Integer,java.lang.Short>public boolean equals(java.lang.Object o)
equals in interface java.util.Map<java.lang.Integer,java.lang.Short>equals in class java.util.AbstractMap<java.lang.Integer,java.lang.Short>public int hashCode()
hashCode in interface java.util.Map<java.lang.Integer,java.lang.Short>hashCode in class java.util.AbstractMap<java.lang.Integer,java.lang.Short>