util
Interface Predicate<T>

Type Parameters:
T - The argument type of the function.

public interface Predicate<T>

A function returning a boolean value. Used by methods of the Functional class.

For instance, one could create a predicate to tell if a given integer is even or odd:

      isEven = new Predicate<Integer>() {
          boolean f(int n) {
              return f % 2 == 0;
          }
      }
  

This predicate could then be passed to methods like Functional.separate(Collection, Predicate, Collection, Collection) (see the example there).


Method Summary
 boolean f(T arg)
          This method defines the function represented by this Predicate.
 

Method Detail

f

boolean f(T arg)
This method defines the function represented by this Predicate.

Parameters:
arg - The argument to the function.
Returns:
The answer.