|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.util.Dictionary
|
+--java.util.Hashtable
|
+--java.util.Properties
|
+--gov.lanl.Utility.ConfigProperties
Extension of Properties class to support command line specification of properties

| Field Summary |
| Fields inherited from class java.util.Properties |
defaults |
| Constructor Summary | |
ConfigProperties()
Constructor declaration which adds the System properties to the Properties |
|
ConfigProperties(java.applet.Applet app)
|
|
ConfigProperties(java.util.ResourceBundle bundle)
Initialize the class from a ResourceBundle |
|
ConfigProperties(java.lang.String[] args)
|
|
ConfigProperties(java.lang.String default_file,
java.lang.String[] args)
initialize the class using a default_file and arguments |
|
| Method Summary | |
java.lang.String |
getProp(java.lang.String key)
return Property corresponding to key |
java.lang.String |
getProp(java.lang.String key,
java.lang.String defaultValue)
get a Property with a method that works for applets |
java.lang.String[] |
getPropertyTuple(java.lang.String key)
Get the value of the property with the given key, splitting it on the tuple delimiter. |
java.lang.String[] |
getPropertyTuple(java.lang.String key,
int size)
Get the value of the property with the given key, splitting it on the tuple delimiter. |
void |
parseLine(java.lang.String line)
Parse the input line with # and // as comments to populate the properties |
void |
readFile(java.lang.String file)
read the file and parse it into properties |
void |
setProperties(java.util.ResourceBundle bundle)
set the properties from a ResourceBundle |
void |
setProperties(java.lang.String default_file)
set properties from default_file |
void |
setProperties(java.lang.String default_file,
java.lang.String[] args)
set properties from default_file and from commandline |
| Methods inherited from class java.util.Properties |
getProperty, getProperty, list, list, load, propertyNames, save, setProperty, store |
| Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ConfigProperties()
public ConfigProperties(java.lang.String[] args)
args - public ConfigProperties(java.applet.Applet app)
app - public ConfigProperties(java.util.ResourceBundle bundle)
bundle - which is read to add properties
public ConfigProperties(java.lang.String default_file,
java.lang.String[] args)
default_file - to be readargs - String array with command line arguments to be parsed| Method Detail |
public void setProperties(java.util.ResourceBundle bundle)
bundle - which is read to add propertiespublic void setProperties(java.lang.String default_file)
public void setProperties(java.lang.String default_file,
java.lang.String[] args)
default_file - args - String array containing -propertyname value pairspublic void readFile(java.lang.String file)
file - public void parseLine(java.lang.String line)
line - to be parsedpublic java.lang.String getProp(java.lang.String key)
key -
public java.lang.String getProp(java.lang.String key,
java.lang.String defaultValue)
key - defaultValue -
public java.lang.String[] getPropertyTuple(java.lang.String key)
key - Name of property to get
public java.lang.String[] getPropertyTuple(java.lang.String key,
int size)
key - Name of property to getsize - length of array to be returned, or if -1, determined by number of tokens
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||