Package tvi.webrtc
Interface Predicate<T>
public interface Predicate<T>
Represents a predicate (boolean-valued function) of one argument.
-
Method Summary
Modifier and TypeMethodDescriptionReturns a composed predicate that represents a short-circuiting logical AND of this predicate and another.negate()
Returns a predicate that represents the logical negation of this predicate.Returns a composed predicate that represents a short-circuiting logical OR of this predicate and another.boolean
Evaluates this predicate on the given argument.
-
Method Details
-
test
Evaluates this predicate on the given argument.- Parameters:
arg
- the input argument- Returns:
- true if the input argument matches the predicate, otherwise false
-
or
Returns a composed predicate that represents a short-circuiting logical OR of this predicate and another. When evaluating the composed predicate, if this predicate is true, then the other predicate is not evaluated.- Parameters:
other
- a predicate that will be logically-ORed with this predicate- Returns:
- a composed predicate that represents the short-circuiting logical OR of this predicate and the other predicate
-
and
Returns a composed predicate that represents a short-circuiting logical AND of this predicate and another.- Parameters:
other
- a predicate that will be logically-ANDed with this predicate- Returns:
- a composed predicate that represents the short-circuiting logical AND of this predicate and the other predicate
-
negate
Returns a predicate that represents the logical negation of this predicate.- Returns:
- a predicate that represents the logical negation of this predicate
-