Package jmri.jmrit.logixng.util
Class LogixNG_SelectDouble.DefaultFormatterParserValidator
- java.lang.Object
-
- jmri.jmrit.logixng.util.LogixNG_SelectDouble.DefaultFormatterParserValidator
-
- All Implemented Interfaces:
LogixNG_SelectDouble.FormatterParserValidator
- Enclosing class:
- LogixNG_SelectDouble
public static class LogixNG_SelectDouble.DefaultFormatterParserValidator extends java.lang.Object implements LogixNG_SelectDouble.FormatterParserValidator
-
-
Constructor Summary
Constructors Constructor Description DefaultFormatterParserValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
format(double value)
Format the valuedouble
getInitialValue()
Get the initial valuedouble
parse(java.lang.String str)
Parse the stringjava.lang.String
validate(java.lang.String str)
Validates the string
-
-
-
Constructor Detail
-
DefaultFormatterParserValidator
public DefaultFormatterParserValidator()
-
-
Method Detail
-
getInitialValue
public double getInitialValue()
Description copied from interface:LogixNG_SelectDouble.FormatterParserValidator
Get the initial value- Specified by:
getInitialValue
in interfaceLogixNG_SelectDouble.FormatterParserValidator
- Returns:
- the initial value
-
format
public java.lang.String format(double value)
Description copied from interface:LogixNG_SelectDouble.FormatterParserValidator
Format the value- Specified by:
format
in interfaceLogixNG_SelectDouble.FormatterParserValidator
- Parameters:
value
- the value- Returns:
- the formatted string
-
parse
public double parse(java.lang.String str)
Description copied from interface:LogixNG_SelectDouble.FormatterParserValidator
Parse the string- Specified by:
parse
in interfaceLogixNG_SelectDouble.FormatterParserValidator
- Parameters:
str
- the string- Returns:
- the parsed value
-
validate
public java.lang.String validate(java.lang.String str)
Description copied from interface:LogixNG_SelectDouble.FormatterParserValidator
Validates the string- Specified by:
validate
in interfaceLogixNG_SelectDouble.FormatterParserValidator
- Parameters:
str
- the string- Returns:
- null if valid. An error message if not valid
-
-