Class EnumeratedProperties

  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<java.lang.Object,java.lang.Object>
          extended by java.util.Properties
              extended by ghm.follow.config.EnumeratedProperties
All Implemented Interfaces:, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>

public class EnumeratedProperties
extends java.util.Properties

Extension of Properties which allows one to specify property values which are Lists of Strings.

Greg Merrill
See Also:
Serialized Form

Field Summary
protected static char delimiter
          Delimiter between property name & list member index
Fields inherited from class java.util.Properties
Constructor Summary
Method Summary
 java.util.List<java.lang.String> getEnumeratedProperty(java.lang.String key)
          Returns the List value of the property with the supplied key.
 void setEnumeratedProperty(java.lang.String key, java.util.List<java.lang.String> values)
          Assigns the supplied array of String values to the supplied key.
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
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

Field Detail


protected static char delimiter
Delimiter between property name & list member index

Constructor Detail


public EnumeratedProperties()
Method Detail


public java.util.List<java.lang.String> getEnumeratedProperty(java.lang.String key)
Returns the List value of the property with the supplied key. Note that one can call getEnumeratedProperty() for a given key successfully if and only if setEnumeratedProperty() for that key was called some time beforehand. All members of the list returned will be Strings.

key - lookup of the enumerated property to be retrieved.
list containing String values


public void setEnumeratedProperty(java.lang.String key,
                                  java.util.List<java.lang.String> values)
Assigns the supplied array of String values to the supplied key.

key - property lookup
values - values to be associated with the property lookup

Copyright © 2008. All Rights Reserved.