net.sf.jsefa.common.validator
Class NumberValidator<T extends Number>

java.lang.Object
  extended by net.sf.jsefa.common.validator.NumberValidator<T>
Type Parameters:
T - the type of the number
All Implemented Interfaces:
Validator
Direct Known Subclasses:
BigDecimalValidator, IntegerValidator, LongValidator

public abstract class NumberValidator<T extends Number>
extends Object
implements Validator

A validator for Number values.

Author:
Norman Lahme-Huetig

Constructor Summary
protected NumberValidator(net.sf.jsefa.common.validator.ConstraintsAccessor constraintsAccessor)
          Constructs a new NumberValidator.
 
Method Summary
protected  net.sf.jsefa.common.validator.ConstraintsAccessor getConstraintsAccessor()
           
 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
 

Constructor Detail

NumberValidator

protected NumberValidator(net.sf.jsefa.common.validator.ConstraintsAccessor constraintsAccessor)
Constructs a new NumberValidator.

Parameters:
constraintsAccessor - the accessor to the configured constraints
Method Detail

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.

getConstraintsAccessor

protected net.sf.jsefa.common.validator.ConstraintsAccessor getConstraintsAccessor()
Returns:
the constraints accessor


Copyright © 2014. All rights reserved.