Package eu.woolplatform.utils.xml
Class DoubleValueParser
- java.lang.Object
-
- eu.woolplatform.utils.xml.DoubleValueParser
-
- All Implemented Interfaces:
XMLValueParser<Double>
public class DoubleValueParser extends Object implements XMLValueParser<Double>
Value parser for double values. It validates whether the input string is a double, and it can validate whether the value is within a specified range.
-
-
Constructor Summary
Constructors Constructor Description DoubleValueParser()Constructs a new parser without range validation.DoubleValueParser(Double minVal, Double maxVal)Constructs a new parser with range validation.
-
-
-
Method Detail
-
parse
public Double parse(String xml) throws ParseException
Description copied from interface:XMLValueParserParses the specified string value.- Specified by:
parsein interfaceXMLValueParser<Double>- Parameters:
xml- the string value- Returns:
- the Java object
- Throws:
ParseException- if the string value is invalid
-
-