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.Stringformat(int value)Format the valueintgetInitialValue()Get the initial valueintparse(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 int getInitialValue()
Description copied from interface:LogixNG_SelectInteger.FormatterParserValidatorGet the initial value- Specified by:
getInitialValuein interfaceLogixNG_SelectInteger.FormatterParserValidator- Returns:
- the initial value
-
format
public java.lang.String format(int value)
Description copied from interface:LogixNG_SelectInteger.FormatterParserValidatorFormat the value- Specified by:
formatin 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.FormatterParserValidatorParse the string- Specified by:
parsein 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.FormatterParserValidatorValidates the string- Specified by:
validatein interfaceLogixNG_SelectInteger.FormatterParserValidator- Parameters:
str- the string- Returns:
- null if valid. An error message if not valid
-
-