|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jjoost.util.filters.PartialOrderAcceptBetween<E>
org.jjoost.util.filters.AcceptBetween<E>
public class AcceptBetween<E extends java.lang.Comparable<? super E>>
A filter that accepts everything between the provided lower and upper bounds, as determined by the Comparator provided to its methods.
Each bound can be specified as inclusive or exclusive
| Constructor Summary | |
|---|---|
AcceptBetween(E lb,
boolean lbIsInclusive,
E ub,
boolean ubIsInclusive)
Constructs a new filter that accepts everything between the provided lower and upper bounds, as determined by the Comparator provided to its methods. |
|
| Method Summary | ||
|---|---|---|
boolean |
accept(E test)
Returns true if the Filter accepts the parameter and false otherwise |
|
static
|
get(E lb,
boolean lbIsInclusive,
E ub,
boolean ubIsInclusive)
Returns a filter that accepts everything between the provided lower and upper bounds, as determined by the Comparator provided to its methods. |
|
static
|
get(E lb,
E ub)
Returns a partial order filter that accepts everything greater than or equal to the provided lower bound (first argument) and everything strictly less than the provided upper bound (second argument), as determined by the Comparator provided to
its methods by utilising classes. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class org.jjoost.util.filters.PartialOrderAcceptBetween |
|---|
accept, mayAcceptBetween, mayRejectBetween |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jjoost.util.FilterPartialOrder |
|---|
accept, mayAcceptBetween, mayRejectBetween |
| Constructor Detail |
|---|
public AcceptBetween(E lb,
boolean lbIsInclusive,
E ub,
boolean ubIsInclusive)
Comparator provided to its methods.
Each bound can be specified as inclusive or exclusive
lb - lower limit of acceptable valueslbIsInclusive - true if lb should be inclusive, false if exclusiveub - exclusive upper limit of acceptable valuesubIsInclusive - true if ub should be inclusive, false if exclusive| Method Detail |
|---|
public boolean accept(E test)
Filtertrue if the Filter accepts the parameter and false otherwise
accept in interface Filter<E extends java.lang.Comparable<? super E>>test - value to test
true if the filter accepts test; false otherwise
public static <E extends java.lang.Comparable<? super E>> AcceptBetween<E> get(E lb,
E ub)
Comparator provided to
its methods by utilising classes.
lb - inclusive lower limit of acceptable valuesub - exclusive upper limit of acceptable values
[lb...ub)
public static <E extends java.lang.Comparable<? super E>> AcceptBetween<E> get(E lb,
boolean lbIsInclusive,
E ub,
boolean ubIsInclusive)
Comparator provided to its methods.
Each bound can be specified as inclusive or exclusive
lb - lower limit of acceptable valueslbIsInclusive - true if lb should be inclusive, false if exclusiveub - exclusive upper limit of acceptable valuesubIsInclusive - true if ub should be inclusive, false if exclusive
[lb...ub)public java.lang.String toString()
toString in class PartialOrderAcceptBetween<E extends java.lang.Comparable<? super E>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||