|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
org.pf.util.OrderedProperties
public class OrderedProperties
Represents a properties collection with empty lines and comments. The order will be preserved. DO NOT USE THE NORMAL METHODS INHERITED FROM java.util.Hashtable except those that are explicitly overridden in this class!
| Constructor Summary | |
|---|---|
OrderedProperties()
Initialize the new instance with default values. |
|
OrderedProperties(int initialCapacity)
Initialize the new instance with an initial capacity. |
|
| Method Summary | |
|---|---|
void |
clear()
Removes all properties |
boolean |
deleteProperty(java.lang.String name)
Deletes the property with the specified name. |
java.util.Set |
entrySet()
Returns all entries in the order they have been added |
java.lang.String |
getProperty(java.lang.String name)
Returns the value of the property with the given name or null if it is not found. |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Searches for the property with the specified key in this property list. |
java.lang.String[] |
getPropertyNames()
Returns an array containing the properties names in the order they have been added or read from a stream. |
java.util.Enumeration |
keys()
Returns all keys of this properties list in the order they have been added. |
java.util.Set |
keySet()
Returns all keys of this properties list in the order they have been added. |
void |
list(java.io.PrintStream out)
NOT SUPPORTED METHOD! |
void |
list(java.io.PrintWriter out)
NOT SUPPORTED METHOD! |
void |
load(java.io.InputStream inStream)
NOT SUPPORTED METHOD! |
java.util.Enumeration |
propertyNames()
Returns an enumeration of the properties names in the order they have been added or read from a stream. |
java.lang.Object |
remove(java.lang.Object key)
Removes the key (and its corresponding value) from this hashtable. |
void |
save(java.io.OutputStream out,
java.lang.String header)
NOT SUPPORTED METHOD! |
java.lang.Object |
setProperty(java.lang.String name,
java.lang.String value)
Modifies the value or adds the property specified by the given name. |
int |
size()
Returns how many elements are contained. |
void |
store(java.io.OutputStream out,
java.lang.String header)
NOT SUPPORTED METHOD! |
| Methods inherited from class java.util.Properties |
|---|
loadFromXML, storeToXML, storeToXML |
| Methods inherited from class java.util.Hashtable |
|---|
clone, contains, containsKey, containsValue, elements, equals, get, hashCode, isEmpty, put, putAll, toString, values |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OrderedProperties()
public OrderedProperties(int initialCapacity)
| Method Detail |
|---|
public java.lang.String[] getPropertyNames()
public int size()
size in interface java.util.Map<java.lang.Object,java.lang.Object>size in class java.util.Hashtable<java.lang.Object,java.lang.Object>public java.lang.String getProperty(java.lang.String name)
getProperty in class java.util.Propertiesname - The name of the property to look for
public java.lang.Object setProperty(java.lang.String name,
java.lang.String value)
setProperty in class java.util.Propertiesname - The name of the property to setvalue - The new value to be setpublic boolean deleteProperty(java.lang.String name)
name - The name of the property to deletepublic java.lang.Object remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Object,java.lang.Object>remove in class java.util.Hashtable<java.lang.Object,java.lang.Object>
public java.lang.String getProperty(java.lang.String key,
java.lang.String defaultValue)
getProperty in class java.util.Propertiespublic void list(java.io.PrintStream out)
list in class java.util.Propertiesjava.lang.UnsupportedOperationExceptionpublic void list(java.io.PrintWriter out)
list in class java.util.Propertiesjava.lang.UnsupportedOperationException
public void load(java.io.InputStream inStream)
throws java.io.IOException
load in class java.util.Propertiesjava.lang.UnsupportedOperationException
java.io.IOExceptionpublic java.util.Enumeration propertyNames()
Be aware that the returned enumeration is NOT backed by this OrderedProperties object!
propertyNames in class java.util.Properties
public void save(java.io.OutputStream out,
java.lang.String header)
save in class java.util.Propertiesjava.lang.UnsupportedOperationException
public void store(java.io.OutputStream out,
java.lang.String header)
throws java.io.IOException
store in class java.util.Propertiesjava.lang.UnsupportedOperationException
java.io.IOExceptionpublic void clear()
clear in interface java.util.Map<java.lang.Object,java.lang.Object>clear in class java.util.Hashtable<java.lang.Object,java.lang.Object>public java.util.Enumeration keys()
keys in class java.util.Hashtable<java.lang.Object,java.lang.Object>public java.util.Set keySet()
keySet in interface java.util.Map<java.lang.Object,java.lang.Object>keySet in class java.util.Hashtable<java.lang.Object,java.lang.Object>public java.util.Set entrySet()
entrySet in interface java.util.Map<java.lang.Object,java.lang.Object>entrySet in class java.util.Hashtable<java.lang.Object,java.lang.Object>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||