com.ibm.commons.iloader.node.validators
Class StrictNumberValidator
java.lang.Object
com.ibm.commons.iloader.node.validators.DoubleValidator
com.ibm.commons.iloader.node.validators.StrictNumberValidator
- All Implemented Interfaces:
- IValidator
public class StrictNumberValidator
- extends DoubleValidator
A validator that only allows numericals and periods. It is best use the static version of this validator
(com.ibm.commons.iloader.node.validators.StrictNumberValidator.instance
).
Constructor Summary |
StrictNumberValidator()
Creates a new instance of this validator. |
StrictNumberValidator(java.lang.Double minValue,
java.lang.Double maxValue)
Creates a new instance of this validator, with the given minimum and maximum values. |
Method Summary |
boolean |
isBeingValid(java.lang.String value)
Determines if the current value is valid. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
public static final StrictNumberValidator instance
StrictNumberValidator
public StrictNumberValidator()
- Creates a new instance of this validator.
StrictNumberValidator
public StrictNumberValidator(java.lang.Double minValue,
java.lang.Double maxValue)
- Creates a new instance of this validator, with the given minimum and maximum values.
- Parameters:
minValue
- minimum value allowedmaxValue
- maximum value allowed
isBeingValid
public boolean isBeingValid(java.lang.String value)
- Description copied from interface:
IValidator
- Determines if the current value is valid. If it is not valid then it will not be accepted by the widget as
being a valid input. (e.g. inputEvent.doit = false)
- Specified by:
isBeingValid
in interface IValidator
- Overrides:
isBeingValid
in class DoubleValidator
- Parameters:
value
- the string value which has been entered by the end user and requires validation.
- Returns:
- true if the input should be accepted.