DoubleParser class
A localized parser based on {@link NumberFormat#getDecimalFormat}.
class DoubleParser implements Parser<double> { static DoubleParser _INSTANCE; /** * Returns the instance of the no-op renderer. */ factory DoubleParser.instance() { if (_INSTANCE == null) { _INSTANCE = new DoubleParser(); } return _INSTANCE; } DoubleParser(); double parse(String object) { if (object == null || object == "") { return null; } return double.parse(object); } }
Implements
Constructors
new DoubleParser() #
factory DoubleParser.instance() #
Returns the instance of the no-op renderer.
factory DoubleParser.instance() { if (_INSTANCE == null) { _INSTANCE = new DoubleParser(); } return _INSTANCE; }
Methods
double parse(String object) #
double parse(String object) { if (object == null || object == "") { return null; } return double.parse(object); }