|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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 |
|---|
boolean f(T arg)
arg - The argument to the function.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||