public static class Long2ObjectFunctions.Singleton<V> extends AbstractLong2ObjectFunction<V> implements java.io.Serializable, java.lang.Cloneable
Note that albeit the function is immutable, its default return value may be changed.
This class may be useful to implement your own in case you subclass a type-specific function.
| Modifier and Type | Field and Description |
|---|---|
protected long |
key |
protected V |
value |
defRetValue| Modifier | Constructor and Description |
|---|---|
protected |
Singleton(long key,
V value) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
boolean |
containsKey(long k) |
V |
get(long k) |
V |
getOrDefault(long k,
V defaultValue) |
int |
size() |
defaultReturnValue, defaultReturnValueequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitandThenByte, andThenChar, andThenDouble, andThenFloat, andThenInt, andThenLong, andThenObject, andThenReference, andThenShort, apply, compose, composeByte, composeChar, composeDouble, composeFloat, composeInt, composeLong, composeObject, composeReference, composeShort, containsKey, get, getOrDefault, put, put, remove, removeprotected final long key
protected final V value
protected Singleton(long key,
V value)
public boolean containsKey(long k)
containsKey in interface it.unimi.dsi.fastutil.longs.Long2ObjectFunction<V>public V get(long k)
get in interface it.unimi.dsi.fastutil.longs.Long2ObjectFunction<V>public V getOrDefault(long k, V defaultValue)
getOrDefault in interface it.unimi.dsi.fastutil.longs.Long2ObjectFunction<V>public int size()
public java.lang.Object clone()
clone in class java.lang.Object