|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.util.ConfigUtilities
public class ConfigUtilities
Provides convenience methods for processing configuration properties.
Method Summary | |
---|---|
protected static void |
checkInputs(Properties properties,
String propertyName)
Check the validity of the input arguments. |
boolean |
getBooleanProperty(Properties properties,
String propertyName)
Return the required value specified by the given property name from the given properties. |
boolean |
getBooleanProperty(Properties properties,
String propertyName,
boolean isRequired)
Return the value specified by the given property name from the given properties. |
Class |
getClassProperty(Properties properties,
String propertyName)
Return the required value specified by the given property name from the given properties. |
Class |
getClassProperty(Properties properties,
String propertyName,
boolean isRequired)
Return the value specified by the given property name from the given properties. |
Dimension |
getDimensionProperty(Properties properties,
String propertyName)
Return the required value specified by the given property name from the given properties. |
Dimension |
getDimensionProperty(Properties properties,
String propertyName,
boolean isRequired)
Return the value specified by the given property name from the given properties. |
double[] |
getDoubleArrayProperty(Properties properties,
String propertyName)
Return the required value specified by the given property name from the given properties. |
double[] |
getDoubleArrayProperty(Properties properties,
String propertyName,
boolean isRequired)
Return the value specified by the given property name from the given properties. |
double |
getDoubleProperty(Properties properties,
String propertyName)
Return the required value specified by the given property name from the given properties. |
double |
getDoubleProperty(Properties properties,
String propertyName,
boolean isRequired)
Return the value specified by the given property name from the given properties. |
static ConfigUtilities |
getInstance()
Return the singleton instance of this class. |
int[] |
getIntArrayProperty(Properties properties,
String propertyName)
Return the required value specified by the given property name from the given properties. |
int[] |
getIntArrayProperty(Properties properties,
String propertyName,
boolean isRequired)
Return the value specified by the given property name from the given properties. |
int |
getIntProperty(Properties properties,
String propertyName)
Return the required value specified by the given property name from the given properties. |
int |
getIntProperty(Properties properties,
String propertyName,
boolean isRequired)
Return the value specified by the given property name from the given properties. |
protected static int |
getIntProperty(Properties properties,
String propertyName,
boolean isRequired,
int defaultValue)
Return the value specified by the given property name from the given properties. |
int |
getIntProperty(Properties properties,
String propertyName,
int defaultValue)
Return the value specified by the given property name from the given properties. |
long |
getLongProperty(Properties properties,
String propertyName)
Return the required value specified by the given property name from the given properties. |
long |
getLongProperty(Properties properties,
String propertyName,
boolean isRequired)
Return the value specified by the given property name from the given properties. |
Object |
getObjectProperty(Properties properties,
String propertyName)
Return the required value specified by the given property name from the given properties. |
Object |
getObjectProperty(Properties properties,
String propertyName,
boolean isRequired)
Return the value specified by the given property name from the given properties. |
String |
getStringProperty(Properties properties,
String propertyName)
Return the required value specified by the given property name from the given properties. |
String |
getStringProperty(Properties properties,
String propertyName,
boolean isRequired)
Return the value specified by the given property name from the given properties. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ConfigUtilities getInstance()
public boolean getBooleanProperty(Properties properties, String propertyName)
properties
- Source of data.propertyName
- Property name.public boolean getBooleanProperty(Properties properties, String propertyName, boolean isRequired)
properties
- Source of data.propertyName
- Property name.isRequired
- Flag indicating if the property is required.public Class getClassProperty(Properties properties, String propertyName) throws InstantiationException, IllegalAccessException
properties
- Source of data.propertyName
- Property name.
InstantiationException
IllegalAccessException
public Class getClassProperty(Properties properties, String propertyName, boolean isRequired) throws InstantiationException, IllegalAccessException
properties
- Source of data.propertyName
- Property name.isRequired
- Flag indicating if the property is required.
InstantiationException
IllegalAccessException
public Dimension getDimensionProperty(Properties properties, String propertyName)
properties
- Source of data.propertyName
- Property name.public Dimension getDimensionProperty(Properties properties, String propertyName, boolean isRequired)
properties
- Source of data.propertyName
- Property name.isRequired
- Flag indicating if the property is required.public double[] getDoubleArrayProperty(Properties properties, String propertyName)
properties
- Source of data.propertyName
- Property name.public double[] getDoubleArrayProperty(Properties properties, String propertyName, boolean isRequired)
properties
- Source of data.propertyName
- Property name.isRequired
- Flag indicating if the property is required.public double getDoubleProperty(Properties properties, String propertyName)
properties
- Source of data.propertyName
- Property name.public double getDoubleProperty(Properties properties, String propertyName, boolean isRequired)
properties
- Source of data.propertyName
- Property name.isRequired
- Flag indicating if the property is required.public int[] getIntArrayProperty(Properties properties, String propertyName)
properties
- Source of data.propertyName
- Property name.public int[] getIntArrayProperty(Properties properties, String propertyName, boolean isRequired)
properties
- Source of data.propertyName
- Property name.isRequired
- Flag indicating if the property is required.public int getIntProperty(Properties properties, String propertyName)
properties
- Source of data.propertyName
- Property name.public int getIntProperty(Properties properties, String propertyName, boolean isRequired)
properties
- Source of data.propertyName
- Property name.isRequired
- Flag indicating if the property is required.public int getIntProperty(Properties properties, String propertyName, int defaultValue)
properties
- Source of data.propertyName
- Property name.defaultValue
- Default value.public long getLongProperty(Properties properties, String propertyName)
properties
- Source of data.propertyName
- Property name.public long getLongProperty(Properties properties, String propertyName, boolean isRequired)
properties
- Source of data.propertyName
- Property name.isRequired
- Flag indicating if the property is required.public Object getObjectProperty(Properties properties, String propertyName) throws InstantiationException, IllegalAccessException
properties
- Source of data.propertyName
- Property name.
InstantiationException
IllegalAccessException
public Object getObjectProperty(Properties properties, String propertyName, boolean isRequired) throws InstantiationException, IllegalAccessException
properties
- Source of data.propertyName
- Property name.isRequired
- Flag indicating if the property is required.
InstantiationException
IllegalAccessException
public String getStringProperty(Properties properties, String propertyName)
properties
- Source of data.propertyName
- Property name.public String getStringProperty(Properties properties, String propertyName, boolean isRequired)
properties
- Source of data.propertyName
- Property name.isRequired
- Flag indicating if the property is required.protected static void checkInputs(Properties properties, String propertyName)
protected static int getIntProperty(Properties properties, String propertyName, boolean isRequired, int defaultValue)
properties
- Source of data.propertyName
- Property name.isRequired
- Flag indicating if the property is required.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |