|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.infoglue.cms.applications.workflowtool.util.RangeCheck
public class RangeCheck
Utility class for checking if an integer is within a (possible open-ended) range.
| Field Summary | |
|---|---|
static int |
BETWEEN
Return code if the checked value is outside the range and the range is [x,y]. |
static int |
BETWEEN_ONE_AND_MANY
Return code if the checked value is outside the range and the range is [1,y]. |
static int |
EXACTLY
Return code if the checked value is outside the range and the range is [x,x]. |
static int |
EXACTLY_ONE
Return code if the checked value is outside the range and the range is [1,1]. |
static int |
GREATER_THAN
Return code if the checked value is outside the range and the range is [x,[. |
static int |
GREATER_THAN_ONE
Return code if the checked value is outside the range and the range is [1,[. |
static int |
LESS_THAN
Return code if the checked value is outside the range and the range is ],x]. |
static int |
OK
Return code if the checked value is inside the range. |
| Constructor Summary | |
|---|---|
RangeCheck(java.lang.Integer min,
java.lang.Integer max)
Constructs an object with the specified limits. |
|
| Method Summary | |
|---|---|
int |
check(int value)
Checks if the specified value is within the range. |
java.lang.Integer |
getMax()
Returns the upper limit or null if open-ended. |
java.lang.Integer |
getMin()
Returns the lower limit or null if open-ended. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int OK
public static final int EXACTLY
public static final int EXACTLY_ONE
public static final int LESS_THAN
public static final int GREATER_THAN
public static final int GREATER_THAN_ONE
public static final int BETWEEN
public static final int BETWEEN_ONE_AND_MANY
| Constructor Detail |
|---|
public RangeCheck(java.lang.Integer min,
java.lang.Integer max)
min - the lower limit; a null value indicates an open end.min - the upper limit; a null value indicates an open end.| Method Detail |
|---|
public final java.lang.Integer getMin()
public final java.lang.Integer getMax()
public final int check(int value)
value - the value to check.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||