org.xnap.util.prefs
Class StringValidator
java.lang.Object
org.xnap.util.prefs.StringValidator
- All Implemented Interfaces:
- Validator
public class StringValidator
- extends java.lang.Object
- implements Validator
A string validator. Makes sure all characters of a string are valid and that
it has a minimum length.
Method Summary |
void |
validate(java.lang.String value)
Validates String . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMAIL
public static final StringValidator EMAIL
- Convenience validator for email addresses.
REGULAR_STRING
public static final StringValidator REGULAR_STRING
- Convenience validator for ordinary strings without whitespaces.
StringValidator
public StringValidator(java.lang.String validChars,
int minLength)
StringValidator
public StringValidator(java.lang.String validChars)
StringValidator
public StringValidator()
validate
public void validate(java.lang.String value)
- Validates
String
.
- Specified by:
validate
in interface Validator
- Throws:
java.lang.IllegalArgumentException
- if newValue is invalid.
Copyright © 2001-2005 XNap Team. All Rights Reserved.