Package ru.ispras.microtesk.utils
Interface Predicate<T>
-
- Type Parameters:
T
- the type that the predicate queries
public interface Predicate<T>
Defines a functor interface implemented by classes that perform a predicate test on an object.A
Predicate
is the object equivalent of anif
statement. It uses the input object to return a true or false value, and is often used in validation or filtering.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
evaluate(T object)
Use the specified parameter to perform a test that returns true or false.
-
-
-
Method Detail
-
evaluate
boolean evaluate(T object)
Use the specified parameter to perform a test that returns true or false.- Parameters:
object
- the object to evaluate, should not be changed- Returns:
- true or false
- Throws:
java.lang.ClassCastException
- (runtime) if the input is the wrong classjava.lang.IllegalArgumentException
- (runtime) if the input is invalid
-
-