com.generationjava.util
Class OrderedProperties

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byjava.util.Properties
              extended bycom.generationjava.util.OrderedProperties
All Implemented Interfaces:
Cloneable, Map, Serializable
Direct Known Subclasses:
CommentedOrderedProperties

public class OrderedProperties
extends Properties

java.util.Properties stores keys and values, but it does not store them in an ordered way. Annoyingly, there is no easy way to splice this feature in, rather it leads to a rewrite of most of the methods and the creation. This is that rewrite.

See Also:
Serialized Form

Field Summary
protected  ArrayList index
           
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
OrderedProperties()
           
OrderedProperties(Properties props)
           
 
Method Summary
 Enumeration keys()
           
 Set keySet()
           
static OrderedProperties load(File file)
           
 Enumeration propertyNames()
           
 Object put(Object key, Object value)
           
 Object remove(Object key)
           
 void save(OutputStream outstrm, String header)
          Currently will write out defaults as well, which is not in the specification.
 Object setProperty(String key, String value)
           
 void store(OutputStream outstrm, String header)
          Currently will write out defaults as well, which is not in the specification.
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, putAll, rehash, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

index

protected ArrayList index
Constructor Detail

OrderedProperties

public OrderedProperties()

OrderedProperties

public OrderedProperties(Properties props)
Method Detail

load

public static OrderedProperties load(File file)

put

public Object put(Object key,
                  Object value)

setProperty

public Object setProperty(String key,
                          String value)

remove

public Object remove(Object key)

propertyNames

public Enumeration propertyNames()

keys

public Enumeration keys()

keySet

public Set keySet()

save

public void save(OutputStream outstrm,
                 String header)
Currently will write out defaults as well, which is not in the specification.


store

public void store(OutputStream outstrm,
                  String header)
           throws IOException
Currently will write out defaults as well, which is not in the specification.

Throws:
IOException


Copyright © 2000-2005 OSJava. All Rights Reserved.