public static class Short2ObjectMaps.Singleton<V> extends Short2ObjectFunctions.Singleton<V> implements Short2ObjectMap<V>, java.io.Serializable, java.lang.Cloneable
This class may be useful to implement your own in case you subclass a type-specific map.
Short2ObjectMap.Entry<V>, Short2ObjectMap.FastEntrySet<V>| Modifier and Type | Field and Description |
|---|---|
protected it.unimi.dsi.fastutil.objects.ObjectSet<Short2ObjectMap.Entry<V>> |
entries |
protected it.unimi.dsi.fastutil.shorts.ShortSet |
keys |
protected it.unimi.dsi.fastutil.objects.ObjectCollection<V> |
values |
key, valuedefRetValue| Modifier | Constructor and Description |
|---|---|
protected |
Singleton(short key,
V value) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsValue(java.lang.Object v) |
it.unimi.dsi.fastutil.objects.ObjectSet<java.util.Map.Entry<java.lang.Short,V>> |
entrySet()
Deprecated.
Please use the corresponding type-specific method instead.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
boolean |
isEmpty() |
it.unimi.dsi.fastutil.shorts.ShortSet |
keySet() |
void |
putAll(java.util.Map<? extends java.lang.Short,? extends V> m) |
it.unimi.dsi.fastutil.objects.ObjectSet<Short2ObjectMap.Entry<V>> |
short2ObjectEntrySet()
Returns a type-specific set view of the mappings contained in this map.
|
java.lang.String |
toString() |
it.unimi.dsi.fastutil.objects.ObjectCollection<V> |
values() |
clone, containsKey, get, getOrDefault, sizedefaultReturnValue, defaultReturnValuefinalize, getClass, notify, notifyAll, wait, wait, waitclear, compute, computeIfAbsent, computeIfAbsent, computeIfAbsentPartial, computeIfPresent, containsKey, containsKey, defaultReturnValue, defaultReturnValue, forEach, get, getOrDefault, getOrDefault, merge, put, putIfAbsent, remove, remove, replace, replace, sizeandThenByte, andThenChar, andThenDouble, andThenFloat, andThenInt, andThenLong, andThenObject, andThenReference, andThenShort, apply, compose, composeByte, composeChar, composeDouble, composeFloat, composeInt, composeLong, composeObject, composeReference, composeShort, get, put, removeprotected transient it.unimi.dsi.fastutil.objects.ObjectSet<Short2ObjectMap.Entry<V>> entries
protected transient it.unimi.dsi.fastutil.shorts.ShortSet keys
protected transient it.unimi.dsi.fastutil.objects.ObjectCollection<V> values
protected Singleton(short key,
V value)
public boolean containsValue(java.lang.Object v)
containsValue in interface java.util.Map<java.lang.Short,V>public void putAll(java.util.Map<? extends java.lang.Short,? extends V> m)
putAll in interface java.util.Map<java.lang.Short,V>public it.unimi.dsi.fastutil.objects.ObjectSet<Short2ObjectMap.Entry<V>> short2ObjectEntrySet()
Short2ObjectMapThis method is necessary because there is no inheritance along
type parameters: it is thus impossible to strengthen Map.entrySet()
so that it returns an ObjectSet
of type-specific entries (the latter makes it possible to
access keys and values with type-specific methods).
short2ObjectEntrySet in interface Short2ObjectMap<V>Map.entrySet()@Deprecated public it.unimi.dsi.fastutil.objects.ObjectSet<java.util.Map.Entry<java.lang.Short,V>> entrySet()
entrySet in interface Short2ObjectMap<V>entrySet in interface java.util.Map<java.lang.Short,V>Map.entrySet()public it.unimi.dsi.fastutil.shorts.ShortSet keySet()
Short2ObjectMapkeySet in interface Short2ObjectMap<V>keySet in interface java.util.Map<java.lang.Short,V>Map.keySet()public it.unimi.dsi.fastutil.objects.ObjectCollection<V> values()
Short2ObjectMapvalues in interface Short2ObjectMap<V>values in interface java.util.Map<java.lang.Short,V>Map.values()public boolean isEmpty()
isEmpty in interface java.util.Map<java.lang.Short,V>public int hashCode()
hashCode in interface java.util.Map<java.lang.Short,V>hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in interface java.util.Map<java.lang.Short,V>equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object