public class JsonConfiguration extends java.lang.Object implements Configuration
Constructor and Description |
---|
JsonConfiguration(javax.json.JsonObject object) |
Modifier and Type | Method and Description |
---|---|
ConfigurationArray |
getArray(java.lang.String name)
Get an ConfigurationArray from this configuration if it exists.
|
boolean |
getBoolean(java.lang.String name)
Get a boolean property from this configuration if it exists.
|
Configuration |
getInner(java.lang.String name)
Get an inner Configuration object from this configuration if it exists.
|
java.lang.Number |
getNumber(java.lang.String name)
Get a number property from this configuration if it exists.
|
java.util.Collection<java.lang.String> |
getProperties()
Returns a collection of the property names available in this configuration.
|
java.lang.String |
getString(java.lang.String name)
Get a String property from this configuration if it exists.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
get, getRawData, hasArray, hasBoolean, hasInner, hasNumber, hasString, tryGet, tryGetArray, tryGetBoolean, tryGetInner, tryGetNumber, tryGetString
public java.lang.Number getNumber(java.lang.String name) throws NoSuchPropertyException
Configuration
Configuration.tryGetNumber(String)
.getNumber
in interface Configuration
name
- The name of the propertyNoSuchPropertyException
- If there is no property with the given name, or if there is a property with the
given name, but of a different type.public boolean getBoolean(java.lang.String name) throws NoSuchPropertyException
Configuration
Configuration.tryGetBoolean(String)
.getBoolean
in interface Configuration
name
- The name of the propertyNoSuchPropertyException
- If there is no property with the given name, or if there is a property with the
given name, but of a different type.public java.lang.String getString(java.lang.String name) throws NoSuchPropertyException
Configuration
Configuration.tryGetString(String)
.getString
in interface Configuration
name
- The name of the propertyNoSuchPropertyException
- If there is no property with the given name, or if there is a property with the
given name, but of a different type.public ConfigurationArray getArray(java.lang.String name) throws NoSuchPropertyException
Configuration
Configuration.tryGetArray(String)
. The returned array may be empty.getArray
in interface Configuration
name
- The name of the propertyNoSuchPropertyException
- If there is no property with the given name, or if there is a property with the
given name, but of a different type.public Configuration getInner(java.lang.String name) throws NoSuchPropertyException
Configuration
Configuration.tryGetInner(String)
.getInner
in interface Configuration
name
- The name of the propertyNoSuchPropertyException
- If there is no property with the given name, or if there is a property with the
given name, but of a different type.public java.util.Collection<java.lang.String> getProperties()
Configuration
Configuration.get(String)
and not to return an empty optional
on Configuration.tryGet(String)
.getProperties
in interface Configuration
public java.lang.String toString()
toString
in class java.lang.Object