org.apache.wicket.validation.validator
Class NumberValidator<T extends Number>

java.lang.Object
  extended by org.apache.wicket.validation.validator.AbstractValidator<T>
      extended by org.apache.wicket.validation.validator.NumberValidator<T>
Type Parameters:
T - type of validatable
All Implemented Interfaces:
Serializable, IClusterable, INullAcceptingValidator<T>, IValidator<T>
Direct Known Subclasses:
NumberValidator.DoubleMaximumValidator, NumberValidator.DoubleMinimumValidator, NumberValidator.DoubleRangeValidator, NumberValidator.MaximumValidator, NumberValidator.MinimumValidator, NumberValidator.RangeValidator

Deprecated. RangeValidator, MaximumValidator, MinimumValidator

@Deprecated
public abstract class NumberValidator<T extends Number>
extends AbstractValidator<T>

Validator for checking numbers. Use the static factory methods to make range/minimum or maximum validators for doubles or longs.

Since:
1.2.6 FIXME remove after 1.4
Author:
Jonathan Locke, Johan Compagner, Igor Vaynberg (ivaynberg)
See Also:
Serialized Form

Nested Class Summary
static class NumberValidator.DoubleMaximumValidator
          Deprecated. see MaximumValidator
static class NumberValidator.DoubleMinimumValidator
          Deprecated. see MinimumValidator
static class NumberValidator.DoubleRangeValidator
          Deprecated. see RangeValidator
static class NumberValidator.MaximumValidator
          Deprecated. see MaximumValidator
static class NumberValidator.MinimumValidator
          Deprecated. see MinimumValidator
static class NumberValidator.RangeValidator
          Deprecated. see RangeValidator
 
Field Summary
static NumberValidator NEGATIVE
          Deprecated. see MaximumValidator
static NumberValidator POSITIVE
          Deprecated. see MinimumValidator
 
Constructor Summary
NumberValidator()
          Deprecated.  
 
Method Summary
static NumberValidator maximum(double maximum)
          Deprecated. see MaximumValidator
static NumberValidator maximum(long maximum)
          Deprecated. see MaximumValidator
static NumberValidator minimum(double minimum)
          Deprecated. see MinimumValidator
static NumberValidator minimum(long minimum)
          Deprecated. see MinimumValidator
static NumberValidator range(double minimum, double maximum)
          Deprecated. see RangeValidator
static NumberValidator range(long minimum, long maximum)
          Deprecated. see RangeValidator
 
Methods inherited from class org.apache.wicket.validation.validator.AbstractValidator
error, error, error, error, messageModel, onValidate, resourceKey, resourceKey, validate, validate, validateOnNullValue, variablesMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POSITIVE

@Deprecated
public static final NumberValidator POSITIVE
Deprecated. see MinimumValidator
a validator for ensuring for a positive number value (>0 so not including 0)


NEGATIVE

@Deprecated
public static final NumberValidator NEGATIVE
Deprecated. see MaximumValidator
a validator for ensuring a negative number value (<0 so not including 0)

Constructor Detail

NumberValidator

public NumberValidator()
Deprecated. 
Method Detail

range

@Deprecated
public static NumberValidator range(long minimum,
                                               long maximum)
Deprecated. see RangeValidator

Gets an Integer range validator for checking if a number falls between the minimum and maximum values. If that is not the case, an error message will be generated with the key "RangeValidator". The message keys that can be used are:

Parameters:
minimum - the minimum value
maximum - the maximum value
Returns:
the request NumberValidator

minimum

@Deprecated
public static NumberValidator minimum(long minimum)
Deprecated. see MinimumValidator

Gets an Integer minimum validator for checking if a number is greater than or equal to the given minimum value. If that is not the case, an error message will be generated with the key "MinimumValidator". The message keys that can be used are:

Parameters:
minimum - the minimum value
Returns:
the requested NumberValidator

maximum

@Deprecated
public static NumberValidator maximum(long maximum)
Deprecated. see MaximumValidator

Gets an Integer range validator for checking if a number is smaller than or equal to the given maximum value. If that is not the case, an error message will be generated with the key "MaximumValidator". The message keys that can be used are:

Parameters:
maximum - the maximum value
Returns:
the requested NumberValidator

range

@Deprecated
public static NumberValidator range(double minimum,
                                               double maximum)
Deprecated. see RangeValidator

Gets a Double range validator for checking if a number falls between (including) the minimum and maximum values. If that is not the case, an error message will be generated with the key "RangeValidator". The message keys that can be used are:

Parameters:
minimum - the minimum value
maximum - the maximum value
Returns:
the requested NumberValidator

minimum

@Deprecated
public static NumberValidator minimum(double minimum)
Deprecated. see MinimumValidator

Gets a Double minimum validator for checking if number is greater then or equal to the given minimum value. If that is not the case, an error message will be generated with the key "MinimumValidator". The message keys that can be used are:

Parameters:
minimum - the minimum value
Returns:
the requested NumberValidator

maximum

@Deprecated
public static NumberValidator maximum(double maximum)
Deprecated. see MaximumValidator

Gets a Double maximum validator for checking if an number is smaller than or equal to the given maximum value. If that is not the case, an error message will be generated with the key "MaximumValidator". The message keys that can be used are:

Parameters:
maximum - the maximum value
Returns:
the requested NumberValidator


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.