Package com.google.common.base
Class Functions.PredicateFunction<T>
- java.lang.Object
-
- com.google.common.base.Functions.PredicateFunction<T>
-
-
Field Summary
Fields Modifier and Type Field Description private Predicate<T>predicateprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description privatePredicateFunction(Predicate<T> predicate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Booleanapply(T t)Returns the result of applying this function toinput.booleanequals(java.lang.Object obj)May returntrueif is aFunctionthat behaves identically to this function.inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
apply
public java.lang.Boolean apply(@Nullable T t)Description copied from interface:FunctionReturns 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 obj)Description copied from interface:FunctionMay returntrueif is 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
-
-