public abstract class AbstractShort2ShortMap extends java.util.AbstractMap<java.lang.Short,java.lang.Short> implements Short2ShortMap
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractShort2ShortMap.BasicEntry
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2ShortMap.BuilderCache, Short2ShortMap.Entry, Short2ShortMap.FastEntrySet, Short2ShortMap.MapBuilder| Constructor and Description |
|---|
AbstractShort2ShortMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAll(Short2ShortMap m)
A Helper method to bulk add primitives together.
|
short |
computeShort(short key,
ShortShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfAbsent(short key,
Short2ShortFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfPresent(short key,
ShortShortUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(short key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(short value)
Type Specific method to reduce boxing/unboxing of values
|
Short2ShortMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<java.lang.Short,java.lang.Short>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(ShortShortConsumer 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.
|
java.lang.Short |
getOrDefault(java.lang.Object key,
java.lang.Short defaultValue) |
short |
getOrDefault(short key,
short defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
int |
hashCode() |
ShortSet |
keySet() |
void |
mergeAllShort(Short2ShortMap m,
ShortShortUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
short |
mergeShort(short key,
short value,
ShortShortUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
java.lang.Short |
put(java.lang.Short key,
java.lang.Short value)
Deprecated.
|
void |
putAll(java.util.Map<? extends java.lang.Short,? extends java.lang.Short> m) |
void |
putAll(short[] 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(java.lang.Short[] 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(Short2ShortMap m)
Type Specific function for the bull putting of values
|
void |
putAllIfAbsent(Short2ShortMap m)
Type-Specific bulk put method put elements into the map if not present.
|
java.lang.Short |
remove(java.lang.Object key) |
short |
replace(short key,
short value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(short key,
short oldValue,
short newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceShorts(Short2ShortMap m)
Type-Specific bulk replace method.
|
void |
replaceShorts(ShortShortUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractShort2ShortMap |
setDefaultReturnValue(short v)
Method to define the default return value if a requested key isn't present
|
short |
supplyShortIfAbsent(short 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, merge, put, putAll, putAll, putIfAbsent, putIfAbsent, remove, remove, remove, removeOrDefault, replace, replace, replaceAll, short2ShortEntrySet, subFrom, synchronize, synchronize, unmodifiablepublic short getDefaultReturnValue()
Short2ShortMapgetDefaultReturnValue in interface Short2ShortMappublic AbstractShort2ShortMap setDefaultReturnValue(short v)
Short2ShortMapsetDefaultReturnValue in interface Short2ShortMapv - value that should be the default return valuepublic Short2ShortMap copy()
Short2ShortMapcopy in interface Short2ShortMap@Deprecated
public java.lang.Short put(java.lang.Short key,
java.lang.Short value)
put in interface java.util.Map<java.lang.Short,java.lang.Short>put in interface Short2ShortMapput in class java.util.AbstractMap<java.lang.Short,java.lang.Short>public void addToAll(Short2ShortMap m)
Short2ShortMapaddToAll in interface Short2ShortMapm - the values that should be added/insertedpublic void putAll(Short2ShortMap m)
Short2ShortMapputAll in interface Short2ShortMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Short,? extends java.lang.Short> m)
putAll in interface java.util.Map<java.lang.Short,java.lang.Short>putAll in class java.util.AbstractMap<java.lang.Short,java.lang.Short>public void putAll(short[] keys,
short[] values,
int offset,
int size)
Short2ShortMapputAll in interface Short2ShortMapkeys - 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.Short[] keys,
java.lang.Short[] values,
int offset,
int size)
Short2ShortMapputAll in interface Short2ShortMapkeys - 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(Short2ShortMap m)
Short2ShortMapputAllIfAbsent in interface Short2ShortMapm - elements that should be added if not present.public boolean containsKey(short key)
Short2ShortMapcontainsKey in interface Short2ShortMapkey - element that is searched forpublic boolean containsValue(short value)
Short2ShortMapcontainsValue in interface Short2ShortMapvalue - element that is searched forpublic boolean replace(short key,
short oldValue,
short newValue)
Short2ShortMapreplace in interface Short2ShortMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public short replace(short key,
short value)
Short2ShortMapreplace in interface Short2ShortMapkey - the element that should be searched forvalue - the value to replace with.public void replaceShorts(Short2ShortMap m)
Short2ShortMapreplaceShorts in interface Short2ShortMapm - elements that should be replaced.public void replaceShorts(ShortShortUnaryOperator mappingFunction)
Short2ShortMapreplaceShorts in interface Short2ShortMapmappingFunction - operation to replace all valuespublic short computeShort(short key,
ShortShortUnaryOperator mappingFunction)
Short2ShortMapcomputeShort in interface Short2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic short computeShortIfAbsent(short key,
Short2ShortFunction mappingFunction)
Short2ShortMapcomputeShortIfAbsent in interface Short2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic short supplyShortIfAbsent(short key,
ShortSupplier valueProvider)
Short2ShortMapsupplyShortIfAbsent in interface Short2ShortMapkey - the key that should be computedvalueProvider - the value if not presentpublic short computeShortIfPresent(short key,
ShortShortUnaryOperator mappingFunction)
Short2ShortMapcomputeShortIfPresent in interface Short2ShortMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic short mergeShort(short key,
short value,
ShortShortUnaryOperator mappingFunction)
Short2ShortMapmergeShort in interface Short2ShortMapkey - 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(Short2ShortMap m, ShortShortUnaryOperator mappingFunction)
Short2ShortMapmergeAllShort in interface Short2ShortMapm - 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.Short,java.lang.Short>get in interface Short2ShortMapget in class java.util.AbstractMap<java.lang.Short,java.lang.Short>public java.lang.Short getOrDefault(java.lang.Object key,
java.lang.Short defaultValue)
getOrDefault in interface java.util.Map<java.lang.Short,java.lang.Short>getOrDefault in interface Short2ShortMappublic short getOrDefault(short key,
short defaultValue)
Short2ShortMapgetOrDefault in interface Short2ShortMapkey - 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.Short,java.lang.Short>remove in interface Short2ShortMapremove in class java.util.AbstractMap<java.lang.Short,java.lang.Short>key - the element that should be removedMap.remove(Object)public void forEach(ShortShortConsumer action)
Short2ShortMapforEach in interface Short2ShortMapaction - processor of the values that are iterator overpublic ShortSet keySet()
keySet in interface java.util.Map<java.lang.Short,java.lang.Short>keySet in interface Short2ShortMapkeySet in class java.util.AbstractMap<java.lang.Short,java.lang.Short>public ShortCollection values()
values in interface java.util.Map<java.lang.Short,java.lang.Short>values in interface Short2ShortMapvalues in class java.util.AbstractMap<java.lang.Short,java.lang.Short>public ObjectSet<java.util.Map.Entry<java.lang.Short,java.lang.Short>> entrySet()
entrySet in interface java.util.Map<java.lang.Short,java.lang.Short>entrySet in interface Short2ShortMapentrySet in class java.util.AbstractMap<java.lang.Short,java.lang.Short>public boolean equals(java.lang.Object o)
equals in interface java.util.Map<java.lang.Short,java.lang.Short>equals in class java.util.AbstractMap<java.lang.Short,java.lang.Short>public int hashCode()
hashCode in interface java.util.Map<java.lang.Short,java.lang.Short>hashCode in class java.util.AbstractMap<java.lang.Short,java.lang.Short>