org.apache.wicket.validation.validator
Class NumberValidator<T extends java.lang.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:
java.io.Serializable, IClusterable, INullAcceptingValidator<T>, IValidator<T>
Direct Known Subclasses:
NumberValidator.DoubleMaximumValidator, NumberValidator.DoubleMinimumValidator, NumberValidator.DoubleRangeValidator, NumberValidator.MaximumValidator, NumberValidator.MinimumValidator, NumberValidator.RangeValidator

Deprecated. see (Range,Maximum,Minimum)Validator<Z extends Comparable<Z>>

@Deprecated
public abstract class NumberValidator<T extends java.lang.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<Z extends Comparable<Z>>
static class NumberValidator.DoubleMinimumValidator
          Deprecated. see MinimumValidator<Z extends Comparable<Z>>
static class NumberValidator.DoubleRangeValidator
          Deprecated. see RangeValidator<Z extends Comparable<Z>>
static class NumberValidator.MaximumValidator
          Deprecated. see MaximumValidator<Z extends Comparable<Z>>
static class NumberValidator.MinimumValidator
          Deprecated. see MinimumValidator<Z extends Comparable<Z>>
static class NumberValidator.RangeValidator
          Deprecated. see RangeValidator<Z extends Comparable<Z>>
 
Field Summary
static NumberValidator NEGATIVE
          Deprecated. see MaximumValidator<Z extends Comparable<Z>>
static NumberValidator POSITIVE
          Deprecated. see MinimumValidator<Z extends Comparable<Z>>
 
Constructor Summary
NumberValidator()
          Deprecated.  
 
Method Summary
static NumberValidator maximum(double maximum)
          Deprecated. see MaximumValidator<Z extends Comparable<Z>>
static NumberValidator maximum(long maximum)
          Deprecated. see MaximumValidator<Z extends Comparable<Z>>
static NumberValidator minimum(double minimum)
          Deprecated. see MinimumValidator<Z extends Comparable<Z>>
static NumberValidator minimum(long minimum)
          Deprecated. see MinimumValidator<Z extends Comparable<Z>>
static NumberValidator range(double minimum, double maximum)
          Deprecated. see NumberValidator.RangeValidator<Z extends Comparable<Z>>
static NumberValidator range(long minimum, long maximum)
          Deprecated. see NumberValidator.RangeValidator<Z extends Comparable<Z>>
 
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<Z extends Comparable<Z>>
a validator for ensuring for a positive number value (>0 so not including 0)


NEGATIVE

@Deprecated
public static final NumberValidator NEGATIVE
Deprecated. see MaximumValidator<Z extends Comparable<Z>>
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 NumberValidator.RangeValidator<Z extends Comparable<Z>>

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<Z extends Comparable<Z>>

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<Z extends Comparable<Z>>

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 NumberValidator.RangeValidator<Z extends Comparable<Z>>

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<Z extends Comparable<Z>>

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<Z extends Comparable<Z>>

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-2009 Apache Software Foundation. All Rights Reserved.