|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FilterPartialOrder<P>
This interface is used to define an abstract filter over a data set whose type is known but whose
ordering may not be. With a provided Comparator instances of this interface should be able to
indicate whether or not a range bounds a value that the filter accepts. Null values cannot be part of the
ordering, as they indicate +/- infinite to the mayAcceptBetween() method
| Method Summary | |
|---|---|
boolean |
accept(P v,
java.util.Comparator<? super P> cmp)
Return true iff this filter and comparator combination accept the provided value |
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. |
| Method Detail |
|---|
boolean accept(P v,
java.util.Comparator<? super P> cmp)
v - the value to checkcmp - the partial order
boolean mayAcceptBetween(P lb,
boolean lbInclusive,
P ub,
boolean ubInclusive,
java.util.Comparator<? super P> cmp)
lb 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.
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
boolean mayRejectBetween(P lb,
boolean lbInclusive,
P ub,
boolean ubInclusive,
java.util.Comparator<? super P> cmp)
lb 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.
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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||