|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.util.prefs.PortRangeValidator
public class PortRangeValidator
A port range validator. Port ranges are used to specify on ore more tcp ports. The format is: [([:number:]*|[:number:]*-[:number:]*);]*
Field Summary | |
---|---|
static PortRangeValidator |
DEFAULT
The default validator that allows ranges between PortRange.MIN_PORT and PortRange.MAX_PORT . |
Constructor Summary | |
---|---|
PortRangeValidator()
|
|
PortRangeValidator(int min,
int max)
|
Method Summary | |
---|---|
void |
check(int i)
Checks if i is in range. |
void |
validate(java.lang.String value)
Checks if value is a valid port range string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final PortRangeValidator DEFAULT
PortRange.MIN_PORT
and PortRange.MAX_PORT
.
Constructor Detail |
---|
public PortRangeValidator(int min, int max)
public PortRangeValidator()
Method Detail |
---|
public void validate(java.lang.String value)
value
is a valid port range string.
validate
in interface Validator
java.lang.IllegalArgumentException
- if string format is invalidpublic void check(int i)
i
is in range.
java.lang.IllegalArgumentException
- thrown if i is not in range
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |