public class DefaultConfiguration extends Object implements Configuration
Constructor and Description |
---|
DefaultConfiguration(String key) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(DefaultConfiguration configuration) |
String |
getAttribute(String key) |
String |
getAttribute(String key,
String defaultValue) |
boolean |
getAttributeAsBoolean(String key,
boolean defaultValue) |
float |
getAttributeAsFloat(String key) |
float |
getAttributeAsFloat(String key,
float defaultValue) |
int |
getAttributeAsInteger(String key,
int defaultValue) |
String[] |
getAttributeNames() |
Configuration |
getChild(String key) |
Configuration |
getChild(String key,
boolean required) |
Configuration[] |
getChildren(String key) |
String |
getLocation() |
String |
getValue() |
String |
getValue(String defaultValue) |
boolean |
getValueAsBoolean() |
boolean |
getValueAsBoolean(boolean defaultValue) |
float |
getValueAsFloat() |
float |
getValueAsFloat(float defaultValue) |
int |
getValueAsInteger() |
int |
getValueAsInteger(int defaultValue) |
static String |
toString(Document document)
Deprecated.
For debug only.
|
public DefaultConfiguration(String key)
public void addChild(DefaultConfiguration configuration)
public Configuration getChild(String key)
getChild
in interface Configuration
public Configuration getChild(String key, boolean required)
getChild
in interface Configuration
public Configuration[] getChildren(String key)
getChildren
in interface Configuration
public String[] getAttributeNames()
getAttributeNames
in interface Configuration
public String getAttribute(String key)
getAttribute
in interface Configuration
public String getAttribute(String key, String defaultValue)
getAttribute
in interface Configuration
public boolean getAttributeAsBoolean(String key, boolean defaultValue)
getAttributeAsBoolean
in interface Configuration
public float getAttributeAsFloat(String key) throws ConfigurationException
getAttributeAsFloat
in interface Configuration
ConfigurationException
public float getAttributeAsFloat(String key, float defaultValue)
getAttributeAsFloat
in interface Configuration
public int getAttributeAsInteger(String key, int defaultValue)
getAttributeAsInteger
in interface Configuration
public String getValue() throws ConfigurationException
getValue
in interface Configuration
ConfigurationException
public String getValue(String defaultValue)
getValue
in interface Configuration
public boolean getValueAsBoolean() throws ConfigurationException
getValueAsBoolean
in interface Configuration
ConfigurationException
public boolean getValueAsBoolean(boolean defaultValue)
getValueAsBoolean
in interface Configuration
public int getValueAsInteger() throws ConfigurationException
getValueAsInteger
in interface Configuration
ConfigurationException
public int getValueAsInteger(int defaultValue)
getValueAsInteger
in interface Configuration
public float getValueAsFloat() throws ConfigurationException
getValueAsFloat
in interface Configuration
ConfigurationException
public float getValueAsFloat(float defaultValue)
getValueAsFloat
in interface Configuration
public String getLocation()
getLocation
in interface Configuration
Copyright © 2025 Apache Software Foundation. All rights reserved.