org.apache.tapestry5.func
Interface Predicate<T>


public interface 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.

This was converted from a abstract base class to an interface in 5.3.

Since:
5.2.0
See Also:
FlowOperations.filter(Predicate), FlowOperations.remove(Predicate)

Method Summary
 boolean accept(T element)
          This method is overridden in subclasses to define which objects the Predicate will accept and which it will reject.
 

Method Detail

accept

boolean accept(T element)
This method is overridden in subclasses to define which objects the Predicate will accept and which it will reject.

Parameters:
element - the element from the flow to be evaluated by the Predicate


Copyright © 2003-2012 The Apache Software Foundation.