|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.commons.settings.StringValidator
public class StringValidator
A string validator. Makes sure all characters of a string are valid and that it has a minimum length.
Field Summary | |
---|---|
static StringValidator |
EMAIL
Convenience validator for email addresses. |
static StringValidator |
REGULAR_STRING
Convenience validator for ordinary strings without whitespaces. |
Constructor Summary | |
---|---|
StringValidator()
Constructs a string validator that accepts any non-null String. |
|
StringValidator(String validChars)
Constructs a string validator that accepts any non-null String composed of validChars . |
|
StringValidator(String validChars,
int minLength)
Constructs a string validator that accepts any String composed of validChars with a minimum length of
minlength characters. |
Method Summary | |
---|---|
void |
validate(String value)
Validates String . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final StringValidator EMAIL
public static final StringValidator REGULAR_STRING
Constructor Detail |
---|
public StringValidator(String validChars, int minLength)
validChars
with a minimum length of
minlength
characters.
validChars
- the allowed charactersminLength
- the minimum lengthpublic StringValidator(String validChars)
validChars
.
validChars
- the allowed characterspublic StringValidator()
Method Detail |
---|
public void validate(String value)
Validator
String
.
validate
in interface Validator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |