| java.lang.Object org.apache.cocoon.components.elementprocessor.types.NumericConverter
NumericConverter | public class NumericConverter (Code) | | This class knows how to convert strings into numbers, and also
knows how to check the results against certain criteria
author: Marc Johnson (marc_johnson27591@hotmail.com) version: CVS $Id: NumericConverter.java 433543 2006-08-22 06:22:54Z crossley $ |
extractDouble | public static NumericResult extractDouble(String value)(Code) | | Shortcut for extractDouble without a Validator
Parameters: value - the string holding the double a NumericResult object containing either the doublevalue or an exception generated if there was a problemwith the value; |
extractDouble | public static NumericResult extractDouble(String value, Validator validator)(Code) | | Given a string that is expected to hold a double, get the double value.
Parameters: value - the string holding the double Parameters: validator - a Validator object; if null, no additionalvalidation will be performed a NumericResult object containing either the doublevalue or an exception generated if there was a problemwith the value; |
extractInteger | public static NumericResult extractInteger(String value)(Code) | | Shortcut for extractInteger without a Validator
Parameters: value - the string holding the integer a NumericResult object containing either the integervalue or an exception generated if there was a problemwith the value; |
extractInteger | public static NumericResult extractInteger(String value, Validator validator)(Code) | | Given a string that is expected to hold a integer, get the integer value.
Parameters: value - the string holding the integer Parameters: validator - a Validator object; if null, no additionalvalidation will be performed a NumericResult object containing either the integervalue or an exception generated if there was a problemwith the value; |
extractNonNegativeInteger | public static NumericResult extractNonNegativeInteger(String value)(Code) | | extract a non-negative integer (i.e., an integer with a range
of 1 ... MAX_VALUE)
Parameters: value - the string holding the value a NumericResult object containing either the integervalue or an exception generated if there was a problemwith the value; |
extractPositiveInteger | public static NumericResult extractPositiveInteger(String value)(Code) | | extract a positive integer (i.e., an integer with a range of 1
... MAX_VALUE)
Parameters: value - the string holding the value a NumericResult object containing either the integervalue or an exception generated if there was a problemwith the value; |
|
|