Short Validation and Conversion routines (java.lang.Short).
This validator provides a number of methods for
validating/converting a String value to
a Short using java.text.NumberFormat
to parse either:
using the default format for the default Locale
using a specified pattern with the default Locale
using the default format for a specified Locale
using a specified pattern with a specified Locale
Use one of the isValid() methods to just validate or
one of the validate() methods to validate and receive a
convertedShort value.
Once a value has been sucessfully converted the following
methods can be used to perform minimum, maximum and range checks:
minValue() checks whether the value is greater
than or equal to a specified minimum.
maxValue() checks whether the value is less
than or equal to a specified maximum.
isInRange() checks whether the value is within
a specified range of values.
So that the same mechanism used for parsing an input value
for validation can be used to format output, corresponding
format() methods are also provided. That is you can
format either:
Short Validation and Conversion routines (
java.lang.Short).This validator provides a number of methods for validating/converting a
Stringvalue to aShortusingjava.text.NumberFormatto parse either:LocaleLocaleLocaleLocaleUse one of the
isValid()methods to just validate or one of thevalidate()methods to validate and receive a convertedShortvalue.Once a value has been sucessfully converted the following methods can be used to perform minimum, maximum and range checks:
minValue()checks whether the value is greater than or equal to a specified minimum.maxValue()checks whether the value is less than or equal to a specified maximum.isInRange()checks whether the value is within a specified range of values.So that the same mechanism used for parsing an input value for validation can be used to format output, corresponding
format()methods are also provided. That is you can format either:LocaleLocaleLocaleLocale