public class DoubleParser extends java.lang.Object implements ValueParser<java.lang.Double>
| Constructor and Description |
|---|
DoubleParser() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
format(java.lang.Double value)
Format a value as a string.
|
java.lang.Class<java.lang.Double> |
getType()
Returns the
Class of object this ValueParser can handle. |
java.lang.Double |
parse(java.lang.String valueString)
Parses the specified string and constructs the appropriate object out of
it.
|
public java.lang.Class<java.lang.Double> getType()
ValueParserClass of object this ValueParser can handle.
The ValueParser.parse(String) method must return objects that are assignable to this type.
The #format(T) method can format any object assignable to this type.
The returned class will be the
exact Class (i.e. not a subclass) of this
ValueParser's typegetType in interface ValueFormatter<java.lang.Double>getType in interface ValueParser<java.lang.Double>ValueParserpublic java.lang.Double parse(java.lang.String valueString)
throws ValueParseException
ValueParserparse in interface ValueParser<java.lang.Double>ValueParseException - If valueString is not of a format that allows this
parser to convert it into an object of type TvalueString - The string to parsevalueStringpublic java.lang.String format(java.lang.Double value)
ValueParserformat in interface ValueFormatter<java.lang.Double>format in interface ValueParser<java.lang.Double>value - The object to format