com.sas.util.validators
Class MinMaxIntegerStringValidator
com.sas.util.validators.MinMaxIntegerStringValidator
All Implemented Interfaces: ValidationInterface , java.io.Serializable
public class MinMaxIntegerStringValidator
See Also: Serialized Form
valueBelowMin
public static final java.lang.String valueBelowMin
See Also: Constant Field Values
valueAboveMax
public static final java.lang.String valueAboveMax
See Also: Constant Field Values
VALUE_BELOW_MIN
protected static final int VALUE_BELOW_MIN
See Also: Constant Field Values
VALUE_ABOVE_MAX
protected static final int VALUE_ABOVE_MAX
See Also: Constant Field Values
min
protected int min
max
protected int max
MinMaxIntegerStringValidator
public MinMaxIntegerStringValidator ()
MinMaxIntegerStringValidator
public MinMaxIntegerStringValidator (int min,
int max)
validateValue
public boolean validateValue (java.lang.Object component,
java.lang.Object value)
Description copied from class: Validator
Default implementation. Returns true. Subclasses should override
and perform the actual validation.
Specified by: validateValue
in interface ValidationInterface
Overrides: validateValue
in class IntegerStringValidator
Parameters: component
- an object containing the valuevalue
- the value to be validated
Returns: true if the value us valid, false if not.
If false is returned, the
validator should call setValidationMessage with a String for a reason. See Also: ValidationInterface.validateValue(java.lang.Object, java.lang.Object)
createValidationMessages
public void createValidationMessages ()
Description copied from class: Validator
createValidationMessages is called by the constructor to create the collection
of message objects that are accessed by validateValue. This can be overridden
by subclasses to allow for different messages to be displayed. For each message,
newValidationMessage is called to create the actual Message object. Other data can
then be set on the Message object if desired.
Overrides: createValidationMessages
in class IntegerStringValidator
See Also: Validator.newValidationMessage(java.lang.String)
Copyright © 2009 SAS Institute Inc. All Rights Reserved.