public class AndFilter<T> extends CompoundFilter<T>
Constructor and Description |
---|
AndFilter(Filter<T> filter1,
Filter<T> filter2)
Creates a new
AndFilter that will "accept" any object that is
accept by both of the specified wrapped filters. |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(T value)
Determines whether the specified object is "accepted" by the filter.
|
static <T> Filter<T> |
and(Filter<T>... filters)
Creates a new
ANDFilter that will "accept" any object that is
accept by all of the specified filters. |
AndFilter<T> |
clone() |
equals, getFilter1, getFilter2, hashCode, toString
public AndFilter(Filter<T> filter1, Filter<T> filter2)
AndFilter
that will "accept" any object that is
accept by both of the specified wrapped filters.filter1
- The first Filter
that might "accept" any objectfilter2
- The second Filter
that might "accept" any objectpublic static <T> Filter<T> and(Filter<T>... filters)
ANDFilter
that will "accept" any object that is
accept by all of the specified filters.filters
- The list of Filter
s encapsulated by a chain of
AndFilter
sORFilter
s that will "accept" any
object when all Filter
s accepts the objectpublic boolean accept(T value)
value
- The value to filtertrue
if the given value is "accepted" by this filter;
false
if it was "rejected".public AndFilter<T> clone()
clone
in class CompoundFilter<T>
EclipseLink 2.3.2, "build v20111125-r10461" API Reference