org.xnap.util.prefs
Class StringValidator

java.lang.Object
  extended by 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.


Field Summary
static StringValidator EMAIL
          Convenience validator for email addresses.
static StringValidator REGULAR_STRING
          Convenience validator for ordinary strings without whitespaces.
 
Constructor Summary
StringValidator()
           
StringValidator(java.lang.String validChars)
           
StringValidator(java.lang.String validChars, int minLength)
           
 
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
 

Field Detail

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.

Constructor Detail

StringValidator

public StringValidator(java.lang.String validChars,
                       int minLength)

StringValidator

public StringValidator(java.lang.String validChars)

StringValidator

public StringValidator()
Method Detail

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.