public static class Reference2IntFunctions.PrimitiveFunction<K> extends java.lang.Object implements Reference2IntFunction<K>
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(java.lang.Object key)
Returns true if this function contains a mapping for the specified key.
|
java.lang.Integer |
get(java.lang.Object key)
Deprecated.
|
int |
getInt(java.lang.Object key)
Returns the value to which the given key is mapped.
|
int |
getOrDefault(java.lang.Object key,
int defaultValue)
Returns the value associated by this function to the specified key, or give the specified
value if not present.
|
java.lang.Integer |
getOrDefault(java.lang.Object key,
java.lang.Integer defaultValue)
Deprecated.
|
java.lang.Integer |
put(K key,
java.lang.Integer value)
Deprecated.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen, andThenByte, andThenChar, andThenDouble, andThenFloat, andThenInt, andThenLong, andThenObject, andThenReference, andThenShort, applyAsInt, composeByte, composeChar, composeDouble, composeFloat, composeInt, composeLong, composeObject, composeReference, composeShort, defaultReturnValue, defaultReturnValue, put, remove, removeInt
public boolean containsKey(java.lang.Object key)
Function
Note that for some kind of functions (e.g., hashes) this method will always return true. This default implementation, in particular, always return true.
key
- the key.key
.Map.containsKey(Object)
public int getInt(java.lang.Object key)
Reference2IntFunction
getInt
in interface Reference2IntFunction<K>
key
- the key.Function.get(Object)
public int getOrDefault(java.lang.Object key, int defaultValue)
Reference2IntFunction
getOrDefault
in interface Reference2IntFunction<K>
key
- the key.defaultValue
- the value to return if not present.defaultValue
if no value was present for the given key.Function.getOrDefault(Object, Object)
@Deprecated public java.lang.Integer get(java.lang.Object key)
Reference2IntFunction
get
in interface Reference2IntFunction<K>
key
- the key.null
if no value was present for the given key.Map.get(Object)
@Deprecated public java.lang.Integer getOrDefault(java.lang.Object key, java.lang.Integer defaultValue)
Reference2IntFunction
getOrDefault
in interface Reference2IntFunction<K>
key
- the key.defaultValue
- the default value to return if not present.defaultValue
if no value was present for the
given key.Map.getOrDefault(Object, Object)
@Deprecated public java.lang.Integer put(K key, java.lang.Integer value)
Reference2IntFunction
put
in interface Reference2IntFunction<K>
key
- the key.value
- the value.null
if no value was present for the given key.Map.put(Object,Object)