public interface ConfigurationValue
| Modifier and Type | Method and Description |
|---|---|
Optional<Boolean> |
asBoolean()
Retrieves the property value as a boolean.
|
boolean |
asBooleanOrDefault(boolean defaultValue)
Retrieves the property value as a boolean or the provided default value
if not present or if the value could not be parsed,
|
Optional<Integer> |
asInt()
Retrieves the property value as an integer.
|
int |
asIntOrDefault(int defaultValue)
Retrieves the property value as an integer or the provided default value
if not present or if the value could not be parsed,
|
Optional<Long> |
asLong()
Retrieves the property value as a long.
|
long |
asLongOrDefault(long defaultValue)
Retrieves the property value as a long or the provided default value if
not present or if the value could not be parsed,
|
Optional<String> |
asString()
Retrieves the property value as a string.
|
String |
asStringOrDefault(String defaultValue)
Retrieves the property value as string or the provided default value if
not present.
|
Optional<String> asString()
Optional<Integer> asInt()
Optional<Long> asLong()
Optional<Boolean> asBoolean()
String asStringOrDefault(String defaultValue)
defaultValue - the default value to be returned if the value is not presentint asIntOrDefault(int defaultValue)
defaultValue - the default value to be returned if the value is not present
or could not be parsedlong asLongOrDefault(long defaultValue)
defaultValue - the default value to be returned if the value is not present
or could not be parsedboolean asBooleanOrDefault(boolean defaultValue)
defaultValue - the default value to be returned if the value is not present
or could not be parsedCopyright © 2014. All rights reserved.