|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary
java.util.Hashtable
org.apache.jcs.utils.data.PropertyGroups
represent a file from the classpath, such as C:\JRun\jsm-default\classes\tst.properties which we load via load("\tst.properties") as a group of Properties in a hashtable; thus alpha_zip=1111 beta_zip=2222 gamma_zip=3333 alpha_zap=uggle wurple=wing beta_zap=wuggle zurple=zing becomes a PropertyGroups with Enumeration propertyKeys()=[alpha,beta,gamma] Enumeration simpleKeys()=[wurple,zurple] Properties getProperties("alpha") = {zip=1111,zap=uggle} String getProperty("wurple")=wing. String getProperty("alpha","bibble")=bibble It is an error to define a key both as a group name and a property: alpha=stringval would be an error; it would conflict with alpha_zip or alpha_zap. it is not an error to ask for a property whose name is a group name, but the answer is null.
Nested Class Summary | |
(package private) class |
PropertyGroups.PropertyKeysEnum
Description of the Class |
(package private) class |
PropertyGroups.SimpleKeysEnum
Description of the Class |
Nested classes inherited from class java.util.Hashtable |
|
Field Summary | |
(package private) int |
compoundKeys
|
private java.lang.String |
fileName
|
private java.util.Properties |
props
|
(package private) int |
simpleKeys
|
Fields inherited from class java.util.Hashtable |
|
Constructor Summary | |
PropertyGroups()
Constructor for the PropertyGroups object |
|
PropertyGroups(java.lang.String name)
Constructor for the PropertyGroups object |
Method Summary | |
java.util.Properties |
getProperties(java.lang.String key)
Gets the properties attribute of the PropertyGroups object |
java.lang.String |
getProperty(java.lang.String key)
Gets the property attribute of the PropertyGroups object |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String dflt)
Gets the property attribute of the PropertyGroups object |
private void |
keyVal(java.lang.StringBuffer sB,
java.lang.Object key)
Description of the Method |
void |
load()
Description of the Method |
void |
load(java.lang.String name)
Description of the Method |
java.util.Enumeration |
propertyKeys()
Description of the Method |
java.util.Enumeration |
simpleKeys()
Description of the Method |
java.lang.String |
toString()
Description of the Method |
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, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.util.Properties props
private java.lang.String fileName
int simpleKeys
int compoundKeys
Constructor Detail |
public PropertyGroups()
public PropertyGroups(java.lang.String name) throws java.lang.Exception
name
-
java.lang.Exception
Method Detail |
public void load(java.lang.String name) throws java.lang.Exception
java.lang.Exception
public void load() throws java.lang.Exception
java.lang.Exception
public java.lang.String getProperty(java.lang.String key)
public java.lang.String getProperty(java.lang.String key, java.lang.String dflt)
public java.util.Properties getProperties(java.lang.String key)
public java.util.Enumeration propertyKeys()
public java.util.Enumeration simpleKeys()
private void keyVal(java.lang.StringBuffer sB, java.lang.Object key)
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |