net.sf.jsefa.common.validator
Class StringValidator

java.lang.Object
  extended by net.sf.jsefa.common.validator.StringValidator
All Implemented Interfaces:
Validator

public final class StringValidator
extends Object
implements Validator

A validator for String values.

It is thread-safe and immutable.

Author:
Norman Lahme-Huetig

Method Summary
static StringValidator create(ValidatorConfiguration configuration)
          Constructs a new StringValidator.
 ValidationResult validate(Object value)
          Validates the given value and returns a ValidationResult describing the result of the validation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static StringValidator create(ValidatorConfiguration configuration)
Constructs a new StringValidator.

Parameters:
configuration - the validator configuration
Returns:
a string validator

validate

public ValidationResult validate(Object value)
Validates the given value and returns a ValidationResult describing the result of the validation.

Specified by:
validate in interface Validator
Parameters:
value - the value to validate
Returns:
the result of the validation.


Copyright © 2014. All rights reserved.