T - the type of elements maintained by this Collectionpublic static class Object2ShortMaps.SynchronizedMap<T> extends AbstractObject2ShortMap<T> implements Object2ShortMap<T>
AbstractObject2ShortMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2ShortMap.Entry<T>, Object2ShortMap.FastEntrySet<T>| Modifier and Type | Method and Description |
|---|---|
short |
addTo(T key,
short value)
A Helper method to add a primitives together.
|
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 |
containsValue(short value)
Type Specific method to reduce boxing/unboxing of values
|
void |
forEach(ObjectShortConsumer<T> action)
Type Specific forEach method to reduce boxing/unboxing
|
short |
getDefaultReturnValue()
Method to see what the default return value is.
|
short |
getOrDefault(T key,
short defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
short |
getShort(T key)
A Type Specific get method to reduce boxing/unboxing
|
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
|
ObjectSet<Object2ShortMap.Entry<T>> |
object2ShortEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
short |
put(T key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
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 |
putAllIfAbsent(Object2ShortMap<T> m)
Type-Specific bulk put method put elements into the map if not present.
|
short |
putIfAbsent(T key,
short value)
Type Specific method to reduce boxing/unboxing of values
|
short |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
short |
remOrDefault(T key,
short defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(T key,
short value)
Type Specific remove function to reduce boxing/unboxing
|
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
|
int |
size() |
ShortCollection |
values() |
containsKey, entrySet, equals, get, getOrDefault, hashCodeclear, containsValue, isEmpty, put, remove, toStringcompute, computeIfAbsent, computeIfPresent, containsValue, entrySet, forEach, get, getOrDefault, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAllpublic short getDefaultReturnValue()
Object2ShortMapgetDefaultReturnValue in interface Object2ShortMap<T>getDefaultReturnValue in class AbstractObject2ShortMap<T>public AbstractObject2ShortMap<T> setDefaultReturnValue(short v)
Object2ShortMapsetDefaultReturnValue in interface Object2ShortMap<T>setDefaultReturnValue in class AbstractObject2ShortMap<T>v - value that should be the default return valuepublic short put(T key, short value)
Object2ShortMapput in interface Object2ShortMap<T>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public short putIfAbsent(T key, short value)
Object2ShortMapputIfAbsent in interface Object2ShortMap<T>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Object2ShortMap<T> m)
Object2ShortMapputAllIfAbsent in interface Object2ShortMap<T>putAllIfAbsent in class AbstractObject2ShortMap<T>m - elements that should be added if not present.public short addTo(T key, short value)
Object2ShortMapaddTo in interface Object2ShortMap<T>key - the key that should be inserted,value - the value that should be inserted / addedpublic void addToAll(Object2ShortMap<T> m)
Object2ShortMapaddToAll in interface Object2ShortMap<T>addToAll in class AbstractObject2ShortMap<T>m - the values that should be added/insertedpublic void putAll(Object2ShortMap<T> m)
Object2ShortMapputAll in interface Object2ShortMap<T>putAll in class AbstractObject2ShortMap<T>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends T,? extends java.lang.Short> m)
putAll in interface java.util.Map<T,java.lang.Short>putAll in class AbstractObject2ShortMap<T>public void putAll(T[] keys, short[] values, int offset, int size)
Object2ShortMapputAll in interface Object2ShortMap<T>putAll in class AbstractObject2ShortMap<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 boolean containsValue(short value)
Object2ShortMapcontainsValue in interface Object2ShortMap<T>containsValue in class AbstractObject2ShortMap<T>value - element that is searched forpublic short getShort(T key)
Object2ShortMapgetShort in interface Object2ShortFunction<T>getShort in interface Object2ShortMap<T>key - the key that is searched forpublic short rem(T key)
Object2ShortMaprem in interface Object2ShortMap<T>key - the element that should be removedpublic short remOrDefault(T key, short defaultValue)
Object2ShortMapremOrDefault in interface Object2ShortMap<T>key - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(T key, short value)
Object2ShortMapremove in interface Object2ShortMap<T>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(T key, short oldValue, short newValue)
Object2ShortMapreplace in interface Object2ShortMap<T>replace in class AbstractObject2ShortMap<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>replace in class AbstractObject2ShortMap<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>replaceShorts in class AbstractObject2ShortMap<T>m - elements that should be replaced.public void replaceShorts(ObjectShortUnaryOperator<T> mappingFunction)
Object2ShortMapreplaceShorts in interface Object2ShortMap<T>replaceShorts in class AbstractObject2ShortMap<T>mappingFunction - operation to replace all valuespublic short computeShort(T key, ObjectShortUnaryOperator<T> mappingFunction)
Object2ShortMapcomputeShort in interface Object2ShortMap<T>computeShort in class AbstractObject2ShortMap<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>computeShortIfAbsent in class AbstractObject2ShortMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic short computeShortIfPresent(T key, ObjectShortUnaryOperator<T> mappingFunction)
Object2ShortMapcomputeShortIfPresent in interface Object2ShortMap<T>computeShortIfPresent in class AbstractObject2ShortMap<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>mergeShort in class AbstractObject2ShortMap<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>mergeAllShort in class AbstractObject2ShortMap<T>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic short getOrDefault(T key, short defaultValue)
Object2ShortMapgetOrDefault in interface Object2ShortMap<T>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(ObjectShortConsumer<T> action)
Object2ShortMapforEach in interface Object2ShortMap<T>forEach in class AbstractObject2ShortMap<T>action - processor of the values that are iterator overpublic int size()
public ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Short>keySet in interface Object2ShortMap<T>keySet in class AbstractObject2ShortMap<T>public ShortCollection values()
values in interface java.util.Map<T,java.lang.Short>values in interface Object2ShortMap<T>values in class AbstractObject2ShortMap<T>public ObjectSet<Object2ShortMap.Entry<T>> object2ShortEntrySet()
Object2ShortMapobject2ShortEntrySet in interface Object2ShortMap<T>