|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
creamtec.core.AppProperties
public class AppProperties
AppProperties extends java.util.Properties and adds convenience methods for reading properties from a file and getting typed properties such as boolean and int
| Constructor Summary | |
|---|---|
AppProperties()
Instantiates the object |
|
AppProperties(java.util.Properties defaults)
Instantiates the object populated with default values |
|
AppProperties(java.lang.String fileName)
Instantiates the object and reads the properties from a given file |
|
AppProperties(java.lang.String fileName,
boolean trace)
Instantiates the object and reads the properties from a given file |
|
| Method Summary | |
|---|---|
boolean |
getBooleanProperty(java.lang.String key,
boolean defValue)
Returns a value of the boolean property |
java.lang.String |
getFileName()
Returns the file name that was used to load the properties |
int |
getIntProperty(java.lang.String key,
int defValue)
Returns a value of the int property |
void |
setBooleanProperty(java.lang.String key,
boolean value)
Sets the value of a boolean property |
void |
setIntProperty(java.lang.String key,
int value)
Sets the value of an int property |
| Methods inherited from class java.util.Properties |
|---|
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML |
| Methods inherited from class java.util.Hashtable |
|---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, toString, values |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AppProperties(java.lang.String fileName)
throws java.lang.Exception
fileName - name of the file
java.lang.Exception
public AppProperties(java.lang.String fileName,
boolean trace)
throws java.lang.Exception
fileName - name of the filetrace - if true, a log message will be written indicating the progress of loading
java.lang.Exception
public AppProperties(java.util.Properties defaults)
throws java.lang.Exception
defaults - Properties
java.lang.Exception
public AppProperties()
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public boolean getBooleanProperty(java.lang.String key,
boolean defValue)
key - property namedefValue - default value that should be used if the property has no value
public void setBooleanProperty(java.lang.String key,
boolean value)
key - property namevalue - value
public int getIntProperty(java.lang.String key,
int defValue)
key - property namedefValue - default value that should be used if the property has no value
public void setIntProperty(java.lang.String key,
int value)
key - property namevalue - valuepublic java.lang.String getFileName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||