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.Stringformat(double value)Format the valuedoublegetInitialValue()Get the initial valuedoubleparse(java.lang.String str)Parse the stringjava.lang.Stringvalidate(java.lang.String str)Validates the string
-
-
-
Constructor Detail
-
DefaultFormatterParserValidator
public DefaultFormatterParserValidator()
-
-
Method Detail
-
getInitialValue
public double getInitialValue()
Description copied from interface:LogixNG_SelectDouble.FormatterParserValidatorGet the initial value- Specified by:
getInitialValuein interfaceLogixNG_SelectDouble.FormatterParserValidator- Returns:
- the initial value
-
format
public java.lang.String format(double value)
Description copied from interface:LogixNG_SelectDouble.FormatterParserValidatorFormat the value- Specified by:
formatin 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.FormatterParserValidatorParse the string- Specified by:
parsein 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.FormatterParserValidatorValidates the string- Specified by:
validatein interfaceLogixNG_SelectDouble.FormatterParserValidator- Parameters:
str- the string- Returns:
- null if valid. An error message if not valid
-
-