T
- Type of the object being parsed.public interface ConfigValueParser<T>
Modifier and Type | Interface and Description |
---|---|
static class |
ConfigValueParser.BooleanParser |
static class |
ConfigValueParser.IntegerParser |
static class |
ConfigValueParser.LongParser |
static class |
ConfigValueParser.StringListParser |
static class |
ConfigValueParser.StringParser |
Modifier and Type | Method and Description |
---|---|
T |
compose(java.lang.String fromValue)
Parse a String value in the config into the appropriate object.
|
java.lang.String |
decompose(T ofValue)
Parse an object into a String value to save in the config.
|
static ConfigValueParser |
getParserFor(java.lang.Class type) |
static java.lang.IllegalArgumentException |
nullInvalidException() |
static ConfigValueParser |
toStringParser() |
static ConfigValueParser getParserFor(java.lang.Class type)
static ConfigValueParser toStringParser()
T compose(java.lang.String fromValue)
fromValue
- String value in the config.java.lang.String decompose(T ofValue)
ofValue
- Value to save, not null.java.lang.IllegalArgumentException
- If null value is given.static java.lang.IllegalArgumentException nullInvalidException()