Package jmri.jmrit.logixng.util
Class LogixNG_SelectInteger.DefaultFormatterParserValidator
- java.lang.Object
-
- jmri.jmrit.logixng.util.LogixNG_SelectInteger.DefaultFormatterParserValidator
-
- All Implemented Interfaces:
LogixNG_SelectInteger.FormatterParserValidator
- Enclosing class:
- LogixNG_SelectInteger
public static class LogixNG_SelectInteger.DefaultFormatterParserValidator extends java.lang.Object implements LogixNG_SelectInteger.FormatterParserValidator
-
-
Constructor Summary
Constructors Constructor Description DefaultFormatterParserValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
format(int value)
Format the valueint
getInitialValue()
Get the initial valueint
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 int getInitialValue()
Description copied from interface:LogixNG_SelectInteger.FormatterParserValidator
Get the initial value- Specified by:
getInitialValue
in interfaceLogixNG_SelectInteger.FormatterParserValidator
- Returns:
- the initial value
-
format
public java.lang.String format(int value)
Description copied from interface:LogixNG_SelectInteger.FormatterParserValidator
Format the value- Specified by:
format
in interfaceLogixNG_SelectInteger.FormatterParserValidator
- Parameters:
value
- the value- Returns:
- the formatted string
-
parse
public int parse(java.lang.String str)
Description copied from interface:LogixNG_SelectInteger.FormatterParserValidator
Parse the string- Specified by:
parse
in interfaceLogixNG_SelectInteger.FormatterParserValidator
- Parameters:
str
- the string- Returns:
- the parsed value
-
validate
public java.lang.String validate(java.lang.String str)
Description copied from interface:LogixNG_SelectInteger.FormatterParserValidator
Validates the string- Specified by:
validate
in interfaceLogixNG_SelectInteger.FormatterParserValidator
- Parameters:
str
- the string- Returns:
- null if valid. An error message if not valid
-
-