V - the type of elements maintained by this Collectionpublic static class Short2ObjectMaps.SynchronizedMap<V> extends AbstractShort2ObjectMap<V> implements Short2ObjectMap<V>
AbstractShort2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Short2ObjectMap.Entry<V>, Short2ObjectMap.FastEntrySet<V>| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Deprecated.
|
V |
compute(java.lang.Short key,
java.util.function.BiFunction<? super java.lang.Short,? super V,? extends V> mappingFunction)
Deprecated.
|
V |
compute(short key,
ShortObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfAbsent(java.lang.Short key,
java.util.function.Function<? super java.lang.Short,? extends V> mappingFunction)
Deprecated.
|
V |
computeIfAbsent(short key,
Short2ObjectFunction<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfPresent(java.lang.Short key,
java.util.function.BiFunction<? super java.lang.Short,? super V,? extends V> mappingFunction)
Deprecated.
|
V |
computeIfPresent(short key,
ShortObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(java.lang.Object key)
Deprecated.
|
boolean |
containsKey(short key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
void |
forEach(java.util.function.BiConsumer<? super java.lang.Short,? super V> action)
Deprecated.
|
void |
forEach(ShortObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
get(java.lang.Object key)
Deprecated.
|
V |
getDefaultReturnValue()
Method to see what the default return value is.
|
V |
getObject(short key)
A Type Specific get method to reduce boxing/unboxing
|
V |
getOrDefault(java.lang.Object key,
V defaultValue)
Deprecated.
|
V |
getOrDefault(short key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ShortSet |
keySet() |
V |
merge(java.lang.Short key,
V value,
java.util.function.BiFunction<? super V,? super V,? extends V> mappingFunction)
Deprecated.
|
V |
merge(short key,
V value,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
mergeAll(Short2ObjectMap<V> m,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Bulk method for merging Maps.
|
V |
put(short key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
put(java.lang.Short key,
V value)
Deprecated.
|
void |
putAll(java.util.Map<? extends java.lang.Short,? extends V> m) |
void |
putAll(short[] keys,
V[] 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(Short2ObjectMap<V> m)
Type Specific function for the bull putting of values
|
void |
putAllIfAbsent(Short2ObjectMap<V> m)
Type-Specific bulk put method put elements into the map if not present.
|
V |
putIfAbsent(short key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
putIfAbsent(java.lang.Short key,
V value)
Deprecated.
|
V |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Deprecated.
|
boolean |
remove(short key,
V value)
Type Specific remove function to reduce boxing/unboxing
|
V |
remShort(short key)
Type Specific remove function to reduce boxing/unboxing
|
V |
remShortOrDefault(short key,
V defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
V |
replace(short key,
V value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
V |
replace(java.lang.Short key,
V value)
Deprecated.
|
boolean |
replace(short key,
V oldValue,
V newValue)
A Type Specific replace method to replace an existing value
|
boolean |
replace(java.lang.Short key,
V oldValue,
V newValue)
Deprecated.
|
void |
replaceAll(java.util.function.BiFunction<? super java.lang.Short,? super V,? extends V> mappingFunction)
Deprecated.
|
void |
replaceObjects(Short2ObjectMap<V> m)
Type-Specific bulk replace method.
|
void |
replaceObjects(ShortObjectUnaryOperator<V> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractShort2ObjectMap<V> |
setDefaultReturnValue(V v)
Method to define the default return value if a requested key isn't present
|
ObjectSet<Short2ObjectMap.Entry<V>> |
short2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
int |
size() |
ObjectCollection<V> |
values() |
entrySet, equals, hashCodeentrySet, putAllpublic V getDefaultReturnValue()
Short2ObjectMapgetDefaultReturnValue in interface Short2ObjectMap<V>getDefaultReturnValue in class AbstractShort2ObjectMap<V>public AbstractShort2ObjectMap<V> setDefaultReturnValue(V v)
Short2ObjectMapsetDefaultReturnValue in interface Short2ObjectMap<V>setDefaultReturnValue in class AbstractShort2ObjectMap<V>v - value that should be the default return valuepublic V put(short key, V value)
Short2ObjectMapput in interface Short2ObjectMap<V>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public V putIfAbsent(short key, V value)
Short2ObjectMapputIfAbsent in interface Short2ObjectMap<V>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Short2ObjectMap<V> m)
Short2ObjectMapputAllIfAbsent in interface Short2ObjectMap<V>putAllIfAbsent in class AbstractShort2ObjectMap<V>m - elements that should be added if not present.public void putAll(Short2ObjectMap<V> m)
Short2ObjectMapputAll in interface Short2ObjectMap<V>putAll in class AbstractShort2ObjectMap<V>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Short,? extends V> m)
putAll in interface java.util.Map<java.lang.Short,V>putAll in class AbstractShort2ObjectMap<V>public void putAll(short[] keys,
V[] values,
int offset,
int size)
Short2ObjectMapputAll in interface Short2ObjectMap<V>putAll in class AbstractShort2ObjectMap<V>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 containsKey(short key)
Short2ObjectMapcontainsKey in interface Short2ObjectMap<V>containsKey in class AbstractShort2ObjectMap<V>key - element that is searched forpublic V getObject(short key)
Short2ObjectMapgetObject in interface Short2ObjectFunction<V>getObject in interface Short2ObjectMap<V>key - the key that is searched forpublic V remShort(short key)
Short2ObjectMapremShort in interface Short2ObjectMap<V>key - the element that should be removedpublic V remShortOrDefault(short key, V defaultValue)
Short2ObjectMapremShortOrDefault in interface Short2ObjectMap<V>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(short key,
V value)
Short2ObjectMapremove in interface Short2ObjectMap<V>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(short key,
V oldValue,
V newValue)
Short2ObjectMapreplace in interface Short2ObjectMap<V>replace in class AbstractShort2ObjectMap<V>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public V replace(short key, V value)
Short2ObjectMapreplace in interface Short2ObjectMap<V>replace in class AbstractShort2ObjectMap<V>key - the element that should be searched forvalue - the value to replace with.public void replaceObjects(Short2ObjectMap<V> m)
Short2ObjectMapreplaceObjects in interface Short2ObjectMap<V>replaceObjects in class AbstractShort2ObjectMap<V>m - elements that should be replaced.public void replaceObjects(ShortObjectUnaryOperator<V> mappingFunction)
Short2ObjectMapreplaceObjects in interface Short2ObjectMap<V>replaceObjects in class AbstractShort2ObjectMap<V>mappingFunction - operation to replace all valuespublic V compute(short key, ShortObjectUnaryOperator<V> mappingFunction)
Short2ObjectMapcompute in interface Short2ObjectMap<V>compute in class AbstractShort2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic V computeIfAbsent(short key, Short2ObjectFunction<V> mappingFunction)
Short2ObjectMapcomputeIfAbsent in interface Short2ObjectMap<V>computeIfAbsent in class AbstractShort2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic V computeIfPresent(short key, ShortObjectUnaryOperator<V> mappingFunction)
Short2ObjectMapcomputeIfPresent in interface Short2ObjectMap<V>computeIfPresent in class AbstractShort2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic V merge(short key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
Short2ObjectMapmerge in interface Short2ObjectMap<V>merge in class AbstractShort2ObjectMap<V>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 mergeAll(Short2ObjectMap<V> m, ObjectObjectUnaryOperator<V,V> mappingFunction)
Short2ObjectMapmergeAll in interface Short2ObjectMap<V>mergeAll in class AbstractShort2ObjectMap<V>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic V getOrDefault(short key, V defaultValue)
Short2ObjectMapgetOrDefault in interface Short2ObjectMap<V>getOrDefault in class AbstractShort2ObjectMap<V>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(ShortObjectConsumer<V> action)
Short2ObjectMapforEach in interface Short2ObjectMap<V>forEach in class AbstractShort2ObjectMap<V>action - processor of the values that are iterator overpublic int size()
public ShortSet keySet()
keySet in interface java.util.Map<java.lang.Short,V>keySet in interface Short2ObjectMap<V>keySet in class AbstractShort2ObjectMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Short,V>values in interface Short2ObjectMap<V>values in class AbstractShort2ObjectMap<V>public ObjectSet<Short2ObjectMap.Entry<V>> short2ObjectEntrySet()
Short2ObjectMapshort2ObjectEntrySet in interface Short2ObjectMap<V>@Deprecated public V get(java.lang.Object key)
get in interface java.util.Map<java.lang.Short,V>get in interface Short2ObjectMap<V>get in class AbstractShort2ObjectMap<V>@Deprecated public V getOrDefault(java.lang.Object key, V defaultValue)
getOrDefault in interface java.util.Map<java.lang.Short,V>getOrDefault in interface Short2ObjectMap<V>getOrDefault in class AbstractShort2ObjectMap<V>@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Short,V>containsValue in class AbstractShort2ObjectMap<V>@Deprecated public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Short,V>containsKey in interface Short2ObjectMap<V>containsKey in class java.util.AbstractMap<java.lang.Short,V>key - that is searched for.Map.containsKey(Object)@Deprecated public V put(java.lang.Short key, V value)
put in interface java.util.Map<java.lang.Short,V>put in interface Short2ObjectMap<V>put in class java.util.AbstractMap<java.lang.Short,V>@Deprecated public V remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Short,V>remove in interface Short2ObjectMap<V>remove in class java.util.AbstractMap<java.lang.Short,V>key - the element that should be removedMap.remove(Object)@Deprecated public void clear()
@Deprecated public V putIfAbsent(java.lang.Short key, V value)
putIfAbsent in interface java.util.Map<java.lang.Short,V>putIfAbsent in interface Short2ObjectMap<V>@Deprecated
public boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Short,V>remove in interface Short2ObjectMap<V>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)@Deprecated
public boolean replace(java.lang.Short key,
V oldValue,
V newValue)
replace in interface java.util.Map<java.lang.Short,V>replace in interface Short2ObjectMap<V>@Deprecated public V replace(java.lang.Short key, V value)
replace in interface java.util.Map<java.lang.Short,V>replace in interface Short2ObjectMap<V>@Deprecated public void replaceAll(java.util.function.BiFunction<? super java.lang.Short,? super V,? extends V> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Short,V>replaceAll in interface Short2ObjectMap<V>@Deprecated public V compute(java.lang.Short key, java.util.function.BiFunction<? super java.lang.Short,? super V,? extends V> mappingFunction)
compute in interface java.util.Map<java.lang.Short,V>compute in interface Short2ObjectMap<V>@Deprecated public V computeIfAbsent(java.lang.Short key, java.util.function.Function<? super java.lang.Short,? extends V> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Short,V>computeIfAbsent in interface Short2ObjectMap<V>@Deprecated public V computeIfPresent(java.lang.Short key, java.util.function.BiFunction<? super java.lang.Short,? super V,? extends V> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Short,V>computeIfPresent in interface Short2ObjectMap<V>@Deprecated public V merge(java.lang.Short key, V value, java.util.function.BiFunction<? super V,? super V,? extends V> mappingFunction)
merge in interface java.util.Map<java.lang.Short,V>merge in interface Short2ObjectMap<V>@Deprecated public void forEach(java.util.function.BiConsumer<? super java.lang.Short,? super V> action)
forEach in interface java.util.Map<java.lang.Short,V>forEach in interface Short2ObjectMap<V>