|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.core.closure.support.AlgorithmsAccessor
org.springframework.rules.constraint.ConstraintsAccessor
org.springframework.rules.constraint.AbstractConstraint
org.springframework.rules.constraint.Range
public final class Range
A range whose edges are defined by a minimum Comparable and a maximum Comparable.
Constructor Summary | |
---|---|
Range(Comparable min,
Comparable max)
Creates a range with the specified Comparable min and max
edges. |
|
Range(Comparable min,
Comparable max,
boolean inclusive)
Creates a range with the specified Comparable min and max
edges. |
|
Range(double min,
double max)
Convenience constructor for double ranges. |
|
Range(double min,
double max,
boolean inclusive)
Convenience constructor for double ranges. |
|
Range(float min,
float max)
Convenience constructor for float ranges. |
|
Range(float min,
float max,
boolean inclusive)
Convenience constructor for float ranges. |
|
Range(int min,
int max)
Convenience constructor for int ranges. |
|
Range(int min,
int max,
boolean inclusive)
Convenience constructor for int ranges. |
|
Range(Object min,
Object max,
Comparator comparator)
Creates a range with the specified min and max edges. |
|
Range(Object min,
Object max,
Comparator comparator,
boolean inclusive)
Creates a range with the specified min and max edges. |
Method Summary | |
---|---|
Object |
getMax()
|
Object |
getMin()
|
boolean |
isInclusive()
|
boolean |
test(Object argument)
Test if the specified argument falls within the established range. |
String |
toString()
|
Methods inherited from class org.springframework.rules.constraint.AbstractConstraint |
---|
allTrue, allTrue, anyTrue, anyTrue, findAll, findAll, findFirst, findFirst |
Methods inherited from class org.springframework.rules.constraint.ConstraintsAccessor |
---|
all, all, and, any, any, bind, bind, bind, bind, bind, conjunction, disjunction, eq, eq, eq, eq, eq, eqProperty, eqProperty, getConstraints, gt, gt, gt, gt, gt, gt, gt, gte, gte, gte, gte, gte, gte, gte, gteProperty, gteProperty, gtProperty, gtProperty, ifTrue, ifTrueElse, inGroup, inGroup, inGroup, inRange, inRange, inRangeProperties, inRangeProperties, like, like, lt, lt, lt, lt, lt, lt, lt, lte, lte, lte, lte, lte, lte, lte, lteProperty, lteProperty, ltProperty, ltProperty, maxLength, method, minLength, not, not, or, present, present, range, range, range, range, range, range, range, regexp, regexp, required, required, testResultOf, unique, value |
Methods inherited from class org.springframework.core.closure.support.AlgorithmsAccessor |
---|
allTrue, allTrue, anyTrue, anyTrue, findAll, findAll, findFirst, findFirst, forEach, forEach, getAlgorithms |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Range(Comparable min, Comparable max)
Comparable
min and max
edges.
min
- the low edge of the rangemax
- the high edge of the rangepublic Range(Comparable min, Comparable max, boolean inclusive)
Comparable
min and max
edges.
min
- the low edge of the rangemax
- the high edge of the rangeinclusive
- the range is inclusive?public Range(Object min, Object max, Comparator comparator)
min
- the low edge of the rangemax
- the high edge of the rangecomparator
- the comparator to use to perform value comparisonspublic Range(Object min, Object max, Comparator comparator, boolean inclusive)
min
- the low edge of the rangemax
- the high edge of the rangecomparator
- the comparator to use to perform value comparisonspublic Range(int min, int max)
int
ranges.
public Range(int min, int max, boolean inclusive)
int
ranges.
public Range(float min, float max)
float
ranges.
public Range(float min, float max, boolean inclusive)
float
ranges.
public Range(double min, double max)
double
ranges.
public Range(double min, double max, boolean inclusive)
double
ranges.
Method Detail |
---|
public Object getMin()
public Object getMax()
public boolean isInclusive()
public boolean test(Object argument)
argument
- the argument value
true
if the condition was satisfied,
false
otherwiseConstraint.test(java.lang.Object)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |