Interface ConfigValueParser<T>
- Type Parameters:
T
- Type of the object being parsed.
- All Known Implementing Classes:
ConfigValueParser.BooleanParser
,ConfigValueParser.DoubleParser
,ConfigValueParser.IntegerParser
,ConfigValueParser.LongParser
,ConfigValueParser.StringListParser
,ConfigValueParser.StringParser
public interface ConfigValueParser<T>
Utilities for parsing config values.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
static class
static class
static class
static class
static class
-
Method Summary
Modifier and TypeMethodDescriptionParse a String value in the config into the appropriate object.Parse an object into a String value to save in the config.static ConfigValueParser
getParserFor
(Class type) static IllegalArgumentException
static ConfigValueParser
-
Method Details
-
getParserFor
-
toStringParser
-
compose
Parse a String value in the config into the appropriate object.- Parameters:
fromValue
- String value in the config.- Returns:
- Config value or null if it could not be parsed.
-
decompose
Parse an object into a String value to save in the config.- Parameters:
ofValue
- Value to save, not null.- Returns:
- String format to save in the config.
- Throws:
IllegalArgumentException
- If null value is given.
-
nullInvalidException
-