public class ConfigItem extends Object
| Constructor and Description |
|---|
ConfigItem() |
| Modifier and Type | Method and Description |
|---|---|
Duration |
getDuration()
Returns value of this item as
Duration or throw an ConfigException
if value is missing or have wrong type. |
int |
getInt()
Returns value of this item as int or throw an
ConfigException if value is missing or have wrong type. |
Optional<String> |
getOptionalString()
Returns optional value for this item as string.
|
String |
getString()
Return value of this item as string or throw an
ConfigException if value is missing. |
String |
toString() |
public String getString() throws ConfigException
ConfigException if value is missing.ConfigException - if value is missing or of the wrong type.public Optional<String> getOptionalString()
public int getInt()
throws ConfigException
ConfigException if value is missing or have wrong type.ConfigException - if value is missing or of the wrong type.public Duration getDuration() throws ConfigException
Duration or throw an ConfigException
if value is missing or have wrong type.DurationConfigException - if value is missing or of the wrong type.Copyright © 2022. All rights reserved.