Package com.google.common.base
Class Functions.ForMapWithDefault<K,V>
- java.lang.Object
-
- com.google.common.base.Functions.ForMapWithDefault<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) VdefaultValue(package private) java.util.Map<K,? extends V>mapprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description ForMapWithDefault(java.util.Map<K,? extends V> map, V defaultValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vapply(K key)booleanequals(java.lang.Object o)May returntrueifobjectis aFunctionthat behaves identically to this function.inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
defaultValue
final V defaultValue
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
Description copied from interface:FunctionMay returntrueifobjectis aFunctionthat behaves identically to this function.Warning: do not depend on the behavior of this method.
Historically,
Functioninstances in this library have implemented this method to recognize certain cases where distinctFunctioninstances 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:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-