Interface ObjDoublePredicate<T>
-
- Type Parameters:
T- the type of the object parameter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ObjDoublePredicate<T>
A predicate of two arguments - one object and onedouble.This takes two arguments and returns a
booleanresult.- See Also:
BiPredicate
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ObjDoublePredicate<T>and(ObjDoublePredicate<? super T> other)Returns a new predicate that returns true if both predicates return true.default ObjDoublePredicate<T>negate()Returns a new predicate that negates the result of this predicate.default ObjDoublePredicate<T>or(ObjDoublePredicate<? super T> other)Returns a new predicate that returns true if either predicates returns true.booleantest(T obj, double value)Evaluates the predicate.
-
-
-
Method Detail
-
test
boolean test(T obj, double value)
Evaluates the predicate.- Parameters:
obj- the first argumentvalue- the second argument- Returns:
- true if the arguments match the predicate
-
and
default ObjDoublePredicate<T> and(ObjDoublePredicate<? super T> other)
Returns a new predicate that returns true if both predicates return true.The second predicate is only invoked if the first returns true.
- Parameters:
other- the second predicate- Returns:
- the combined predicate, "this AND that"
- Throws:
NullPointerException- if the other predicate is null
-
or
default ObjDoublePredicate<T> or(ObjDoublePredicate<? super T> other)
Returns a new predicate that returns true if either predicates returns true.The second predicate is only invoked if the first returns false.
- Parameters:
other- the second predicate- Returns:
- the combined predicate, "this OR that"
- Throws:
NullPointerException- if the other predicate is null
-
negate
default ObjDoublePredicate<T> negate()
Returns a new predicate that negates the result of this predicate.- Returns:
- the predicate, "NOT this"
-
-