|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jjoost.util.filters.PartialOrderOr<P>
public class PartialOrderOr<P>
A filter representing the disjunction (i.e. "or") of the supplied partial order filters. The filters are evaluated in the order they are provided (left-to-right) and are evaluated if and only if not previous filters passed.
| Constructor Summary | |
|---|---|
PartialOrderOr(FilterPartialOrder<P> a,
FilterPartialOrder<P> b)
Construct a new filter representing the disjunction (i.e. |
|
| Method Summary | ||
|---|---|---|
boolean |
accept(P test,
java.util.Comparator<? super P> cmp)
Return true iff this filter and comparator combination accept the provided value |
|
static
|
get(FilterPartialOrder<P> a,
FilterPartialOrder<P> b)
Returns the disjunction (i.e. |
|
boolean |
mayAcceptBetween(P lb,
boolean lbInclusive,
P ub,
boolean ubInclusive,
java.util.Comparator<? super P> cmp)
Returns true if there exists (in the total order defined by the comparator, not necessarily in any concrete data set this is being applied to) a value between lb and ub that this filter may accept. |
|
boolean |
mayRejectBetween(P lb,
boolean lbInclusive,
P ub,
boolean ubInclusive,
java.util.Comparator<? super P> cmp)
Returns true if there exists (in the total order defined by the comparator, not necessarily in any concrete data set this is being applied to) a value between lb and ub that this filter may reject. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PartialOrderOr(FilterPartialOrder<P> a,
FilterPartialOrder<P> b)
a - filter to apply firstb - filter to apply second| Method Detail |
|---|
public boolean mayAcceptBetween(P lb,
boolean lbInclusive,
P ub,
boolean ubInclusive,
java.util.Comparator<? super P> cmp)
FilterPartialOrderlb and ub that this filter may accept.
This method may return true if there is no such value, at the cost of more expensive execution but valid behaviour,
however it cannot return false if there is such a value without breaking functionality.
null values should be seen as both +/- infinity, i.e.
containsBetween(null, o) should return containsBefore(o) and
containsBetween(o, null) should return containsAfter(o)
containsBetween should take arguments IN ORDER, i.e. o1 <= o2;
behaviour where o2 < o1 is undefined.
mayAcceptBetween in interface FilterPartialOrder<P>lb - the lower bound of the range to checklbInclusive - if the lower bound should be taken as inclusiveub - the upper bound of the range to checkubInclusive - if the upper bound should be taken as inclusivecmp - the partial order
public boolean mayRejectBetween(P lb,
boolean lbInclusive,
P ub,
boolean ubInclusive,
java.util.Comparator<? super P> cmp)
FilterPartialOrderlb and ub that this filter may reject.
This method may return true if there is no such value at the cost of more expensive execution but valid behaviour,
however it cannot return false if there is such a value without breaking functionality.
null values should be seen as both +/- infinity, i.e.
containsBetween(null, o) should return containsBefore(o) and
containsBetween(o, null) should return containsAfter(o)
containsBetween should take arguments IN ORDER, i.e. o1 <= o2;
behaviour where o2 < o1 is undefined.
mayRejectBetween in interface FilterPartialOrder<P>lb - the lower bound of the range to checklbInclusive - if the lower bound should be taken as inclusiveub - the upper bound of the range to checkubInclusive - if the upper bound should be taken as inclusivecmp - the partial order
public boolean accept(P test,
java.util.Comparator<? super P> cmp)
FilterPartialOrder
accept in interface FilterPartialOrder<P>test - the value to checkcmp - the partial order
public static <P> PartialOrderOr<P> get(FilterPartialOrder<P> a,
FilterPartialOrder<P> b)
a - filter to apply firstb - filter to apply second
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||