Package com.google.common.base
Class Functions.FunctionForMapNoDefault<K,V>
- java.lang.Object
-
- com.google.common.base.Functions.FunctionForMapNoDefault<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Map<K,V>
map
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description FunctionForMapNoDefault(java.util.Map<K,V> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V
apply(K key)
Returns the result of applying this function toinput
.boolean
equals(java.lang.Object o)
May returntrue
if is aFunction
that behaves identically to this function.int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
apply
public V apply(@Nullable K key)
Description copied from interface:Function
Returns the result of applying this function toinput
. This method is generally expected, but not absolutely required, to have the following properties:- Its execution does not cause any observable side effects.
- The computation is consistent with equals; that is,
Objects.equal
(a, b)
implies thatObjects.equal(function.apply(a), function.apply(b))
.
-
equals
public boolean equals(@Nullable java.lang.Object o)
Description copied from interface:Function
May returntrue
if is aFunction
that behaves identically to this function.Warning: do not depend on the behavior of this method.
Historically,
Function
instances in this library have implemented this method to recognize certain cases where distinctFunction
instances would in fact behave identically. However, as code migrates tojava.util.function
, that behavior will disappear. It is best not to depend on it.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-