public class OrFilter extends Filter
or(Filter) method, this creates and
returns a compound OrFilter with this and the other Filter as its
components.
OrFilter has an accept(Content) method that returns true, if
either of the component Filters return true, when applied to the same
Content node. Short-circuit evaluation ensures that the method terminates
as soon as the outcome is logically determined. The component Filters are
applied in the order they were supplied at construction.
| Modifier and Type | Field and Description |
|---|---|
private Filter |
first
The first Filter in the combination.
|
private Filter |
second
The second Filter in the combination.
|
ALLCONTENT, NAMENODES, PARENTNODES, PROPERTYNODES, VALUENODES, XPATHNODES, XPATHTEXT| Constructor and Description |
|---|
OrFilter(Filter first,
Filter second)
Constructs a OrFilter accepting the logical-OR of the patterns
expressed by the first and second Filters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Content node)
Reports whether a given Content node is accepted by this OrFilter.
|
protected OrFilter |
andNodeFilter(NodeFilter other)
Creates a Filter that is the logical-AND of this OrFilter and a
NodeFilter.
|
java.lang.String |
toString()
Returns a pretty representation of this Filter.
|
and, andIndexFilter, not, or, orNodeFilterprivate Filter first
private Filter second
public OrFilter(Filter first, Filter second)
first - a Filter.second - a Filter.public boolean accept(Content node)
protected OrFilter andNodeFilter(NodeFilter other)
andNodeFilter in class Filterother - the other NodeFilter.