|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.components.elementprocessor.types.NumericConverter
public class NumericConverter
This class knows how to convert strings into numbers, and also knows how to check the results against certain criteria
Method Summary | |
---|---|
static NumericResult |
extractDouble(String value)
Shortcut for extractDouble without a Validator |
static NumericResult |
extractDouble(String value,
Validator validator)
Given a string that is expected to hold a double, get the double value. |
static NumericResult |
extractInteger(String value)
Shortcut for extractInteger without a Validator |
static NumericResult |
extractInteger(String value,
Validator validator)
Given a string that is expected to hold a integer, get the integer value. |
static NumericResult |
extractNonNegativeInteger(String value)
extract a non-negative integer (i.e., an integer with a range of 1 ... |
static NumericResult |
extractPositiveInteger(String value)
extract a positive integer (i.e., an integer with a range of 1 ... |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static NumericResult extractDouble(String value)
value
- the string holding the double
public static NumericResult extractDouble(String value, Validator validator)
value
- the string holding the doublevalidator
- a Validator object; if null, no additional
validation will be performed
public static NumericResult extractInteger(String value)
value
- the string holding the integer
public static NumericResult extractInteger(String value, Validator validator)
value
- the string holding the integervalidator
- a Validator object; if null, no additional
validation will be performed
public static NumericResult extractPositiveInteger(String value)
value
- the string holding the value
public static NumericResult extractNonNegativeInteger(String value)
value
- the string holding the value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |