com.generationjava.util
Class OrderedProperties
java.lang.Object
|
+--java.util.Dictionary
|
+--java.util.Hashtable
|
+--java.util.Properties
|
+--com.generationjava.util.OrderedProperties
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Map, java.io.Serializable
- Direct Known Subclasses:
- CommentedOrderedProperties
- public class OrderedProperties
- extends java.util.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 java.util.ArrayList |
index
|
| Fields inherited from class java.util.Properties |
defaults |
|
Method Summary |
java.util.Enumeration |
keys()
|
java.util.Set |
keySet()
|
static com.generationjava.util.OrderedProperties |
load(java.io.File file)
|
java.util.Enumeration |
propertyNames()
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
java.lang.Object |
remove(java.lang.Object key)
|
void |
save(java.io.OutputStream outstrm,
java.lang.String header)
Currently will write out defaults as well, which is not
in the specification. |
java.lang.Object |
setProperty(java.lang.String key,
java.lang.String value)
|
void |
store(java.io.OutputStream outstrm,
java.lang.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 |
index
protected java.util.ArrayList index
OrderedProperties
public OrderedProperties()
OrderedProperties
public OrderedProperties(java.util.Properties props)
load
public static com.generationjava.util.OrderedProperties load(java.io.File file)
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
- Specified by:
put in interface java.util.Map- Overrides:
put in class java.util.Hashtable
setProperty
public java.lang.Object setProperty(java.lang.String key,
java.lang.String value)
- Overrides:
setProperty in class java.util.Properties
remove
public java.lang.Object remove(java.lang.Object key)
- Specified by:
remove in interface java.util.Map- Overrides:
remove in class java.util.Hashtable
propertyNames
public java.util.Enumeration propertyNames()
- Overrides:
propertyNames in class java.util.Properties
keys
public java.util.Enumeration keys()
- Overrides:
keys in class java.util.Hashtable
keySet
public java.util.Set keySet()
- Specified by:
keySet in interface java.util.Map- Overrides:
keySet in class java.util.Hashtable
save
public void save(java.io.OutputStream outstrm,
java.lang.String header)
- Currently will write out defaults as well, which is not
in the specification.
- Overrides:
save in class java.util.Properties
store
public void store(java.io.OutputStream outstrm,
java.lang.String header)
throws java.io.IOException
- Currently will write out defaults as well, which is not
in the specification.
- Overrides:
store in class java.util.Properties
java.io.IOException
Copyright © 2000-2003 OSJava. All Rights Reserved.