|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jjoost.util.filters.PartialOrderNot<P>
public class PartialOrderNot<P>
A that negates/inverts the results of the supplied filter. Users should be aware that filters that do not accurately implement
mayAcceptBetween may break on negation.
| Constructor Summary | |
|---|---|
PartialOrderNot(FilterPartialOrder<P> negate)
Construct a new filter which negates the results of the filter provided |
|
| 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> negate)
Returns the negation of the supplied partial order filter |
|
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 PartialOrderNot(FilterPartialOrder<P> negate)
negate - filter to negate| 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> PartialOrderNot<P> get(FilterPartialOrder<P> negate)
negate - filter to negate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||