|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tapestry5.func.Predicate<T>
public abstract class Predicate<T>
Used when filtering a collection of objects of a given type; the predicate is passed each object in turn, and returns true to include the object in the result collection.
The F class includes a number of Predicate factory methods.
Flow.filter(Predicate),
Flow.remove(Predicate)| Constructor Summary | |
|---|---|
Predicate()
|
|
| Method Summary | |
|---|---|
abstract boolean |
accept(T object)
This method is overridden in subclasses to define which objects the Predicate will accept and which it will reject. |
Predicate<T> |
and(Predicate<? super T> other)
Combines this Predicate with another compatible Predicate to form a new Predicate, which is returned. |
Predicate<T> |
invert()
Inverts this Predicate, returning a new Predicate that inverts the value returned from accept(T). |
Predicate<T> |
or(Predicate<? super T> other)
Combines this Predicate with another compatible Predicate to form a new Predicate, which is returned. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Predicate()
| Method Detail |
|---|
public abstract boolean accept(T object)
public final Predicate<T> and(Predicate<? super T> other)
public final Predicate<T> or(Predicate<? super T> other)
public final Predicate<T> invert()
accept(T).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||