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