T - the type of elements maintained by this Collectionpublic abstract class AbstractObject2ShortMap<T> extends java.util.AbstractMap<T,java.lang.Short> implements Object2ShortMap<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractObject2ShortMap.BasicEntry<T>
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2ShortMap.BuilderCache<T>, Object2ShortMap.Entry<T>, Object2ShortMap.FastEntrySet<T>, Object2ShortMap.MapBuilder| Constructor and Description |
|---|
AbstractObject2ShortMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAll(Object2ShortMap<T> m)
A Helper method to bulk add primitives together.
|
short |
computeShort(T key,
ObjectShortUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfAbsent(T key,
Object2ShortFunction<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
short |
computeShortIfPresent(T key,
ObjectShortUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(short value)
Type Specific method to reduce boxing/unboxing of values
|
Object2ShortMap<T> |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<T,java.lang.Short>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(ObjectShortConsumer<T> 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) |
int |
hashCode() |
ObjectSet<T> |
keySet() |
void |
mergeAllShort(Object2ShortMap<T> m,
ShortShortUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
short |
mergeShort(T key,
short value,
ShortShortUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
java.lang.Short |
put(T key,
java.lang.Short value)
Deprecated.
|
void |
putAll(java.util.Map<? extends T,? extends java.lang.Short> m) |
void |
putAll(Object2ShortMap<T> m)
Type Specific function for the bull putting of values
|
void |
putAll(T[] 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(T[] 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 |
putAllIfAbsent(Object2ShortMap<T> m)
Type-Specific bulk put method put elements into the map if not present.
|
java.lang.Short |
remove(java.lang.Object key) |
short |
replace(T key,
short value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(T key,
short oldValue,
short newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceShorts(Object2ShortMap<T> m)
Type-Specific bulk replace method.
|
void |
replaceShorts(ObjectShortUnaryOperator<T> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractObject2ShortMap<T> |
setDefaultReturnValue(short v)
Method to define the default return value if a requested key isn't present
|
short |
supplyShortIfAbsent(T key,
ShortSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ShortCollection |
values() |
addTo, builder, compute, computeIfAbsent, computeIfPresent, containsValue, forEach, getOrDefault, getShort, merge, object2ShortEntrySet, put, putAll, putAll, putIfAbsent, putIfAbsent, rem, remOrDefault, remove, remove, replace, replace, replaceAll, subFrom, synchronize, synchronize, unmodifiablepublic short getDefaultReturnValue()
Object2ShortMapgetDefaultReturnValue in interface Object2ShortMap<T>public AbstractObject2ShortMap<T> setDefaultReturnValue(short v)
Object2ShortMapsetDefaultReturnValue in interface Object2ShortMap<T>v - value that should be the default return valuepublic Object2ShortMap<T> copy()
Object2ShortMapcopy in interface Object2ShortMap<T>@Deprecated public java.lang.Short put(T key, java.lang.Short value)
put in interface java.util.Map<T,java.lang.Short>put in interface Object2ShortMap<T>put in class java.util.AbstractMap<T,java.lang.Short>public void addToAll(Object2ShortMap<T> m)
Object2ShortMapaddToAll in interface Object2ShortMap<T>m - the values that should be added/insertedpublic void putAll(Object2ShortMap<T> m)
Object2ShortMapputAll in interface Object2ShortMap<T>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends T,? extends java.lang.Short> m)
public void putAll(T[] keys, short[] values, int offset, int size)
Object2ShortMapputAll in interface Object2ShortMap<T>keys - 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(T[] keys, java.lang.Short[] values, int offset, int size)
Object2ShortMapputAll in interface Object2ShortMap<T>keys - 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(Object2ShortMap<T> m)
Object2ShortMapputAllIfAbsent in interface Object2ShortMap<T>m - elements that should be added if not present.public boolean containsKey(java.lang.Object key)
public boolean containsValue(short value)
Object2ShortMapcontainsValue in interface Object2ShortMap<T>value - element that is searched forpublic boolean replace(T key, short oldValue, short newValue)
Object2ShortMapreplace in interface Object2ShortMap<T>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public short replace(T key, short value)
Object2ShortMapreplace in interface Object2ShortMap<T>key - the element that should be searched forvalue - the value to replace with.public void replaceShorts(Object2ShortMap<T> m)
Object2ShortMapreplaceShorts in interface Object2ShortMap<T>m - elements that should be replaced.public void replaceShorts(ObjectShortUnaryOperator<T> mappingFunction)
Object2ShortMapreplaceShorts in interface Object2ShortMap<T>mappingFunction - operation to replace all valuespublic short computeShort(T key, ObjectShortUnaryOperator<T> mappingFunction)
Object2ShortMapcomputeShort in interface Object2ShortMap<T>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic short computeShortIfAbsent(T key, Object2ShortFunction<T> mappingFunction)
Object2ShortMapcomputeShortIfAbsent in interface Object2ShortMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic short supplyShortIfAbsent(T key, ShortSupplier valueProvider)
Object2ShortMapsupplyShortIfAbsent in interface Object2ShortMap<T>key - the key that should be computedvalueProvider - the value if not presentpublic short computeShortIfPresent(T key, ObjectShortUnaryOperator<T> mappingFunction)
Object2ShortMapcomputeShortIfPresent in interface Object2ShortMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic short mergeShort(T key, short value, ShortShortUnaryOperator mappingFunction)
Object2ShortMapmergeShort in interface Object2ShortMap<T>key - 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(Object2ShortMap<T> m, ShortShortUnaryOperator mappingFunction)
Object2ShortMapmergeAllShort in interface Object2ShortMap<T>m - 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<T,java.lang.Short>get in interface Object2ShortMap<T>get in class java.util.AbstractMap<T,java.lang.Short>public java.lang.Short getOrDefault(java.lang.Object key,
java.lang.Short defaultValue)
getOrDefault in interface java.util.Map<T,java.lang.Short>getOrDefault in interface Object2ShortMap<T>public java.lang.Short remove(java.lang.Object key)
remove in interface java.util.Map<T,java.lang.Short>remove in interface Object2ShortMap<T>remove in class java.util.AbstractMap<T,java.lang.Short>key - the element that should be removedMap.remove(Object)public void forEach(ObjectShortConsumer<T> action)
Object2ShortMapforEach in interface Object2ShortMap<T>action - processor of the values that are iterator overpublic ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Short>keySet in interface Object2ShortMap<T>keySet in class java.util.AbstractMap<T,java.lang.Short>public ShortCollection values()
values in interface java.util.Map<T,java.lang.Short>values in interface Object2ShortMap<T>values in class java.util.AbstractMap<T,java.lang.Short>public ObjectSet<java.util.Map.Entry<T,java.lang.Short>> entrySet()
entrySet in interface java.util.Map<T,java.lang.Short>entrySet in interface Object2ShortMap<T>entrySet in class java.util.AbstractMap<T,java.lang.Short>public boolean equals(java.lang.Object o)