|
|||||||||
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
com.scooterframework.common.util.OrderedProperties
public class OrderedProperties
The OrderedProperties class extends Properties class. The order of properties are preserved.
Field Summary | |
---|---|
protected java.util.List<java.lang.Object> |
keys
Holder of keys. |
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
OrderedProperties()
Creates an empty property list with no default values. |
|
OrderedProperties(java.util.Properties defaults)
Creates an empty property list with the specified defaults. |
Method Summary | |
---|---|
void |
clear()
Clears this property so that it contains no keys. |
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
java.util.Iterator<java.lang.Object> |
keyIterator()
Returns an iterator of keys. |
java.util.List<java.lang.Object> |
keyList()
Returns a list of keys. |
java.util.Enumeration<java.lang.Object> |
keys()
Returns an enumeration of keys. |
void |
load(java.io.InputStream inStream)
Reads a property list (key and element pairs) from an input stream with "utf-8" encoding. |
void |
load(java.io.InputStream is,
java.lang.String encoding)
Reads a property list (key and element pairs) from an input stream. |
java.util.Enumeration<java.lang.Object> |
propertyNames()
Returns an enumeration of all the keys in this property list. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Maps the specified key to the specified value in this ordered properties. |
java.lang.Object |
setProperty(java.lang.String key,
java.lang.String value)
Calls the OrderedProperties method put. |
void |
store(java.io.OutputStream os,
java.lang.String header)
Writes a property list (key and element pairs) to an output stream with "utf-8" encoding. |
void |
store(java.io.OutputStream os,
java.lang.String header,
java.lang.String encoding)
Writes a property list (key and element pairs) to an output stream. |
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, loadFromXML, save, storeToXML, storeToXML |
Methods inherited from class java.util.Hashtable |
---|
clone, contains, containsKey, containsValue, elements, entrySet, get, isEmpty, keySet, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.List<java.lang.Object> keys
Constructor Detail |
---|
public OrderedProperties()
public OrderedProperties(java.util.Properties defaults)
defaults
- the defaults.Method Detail |
---|
public int hashCode()
hashCode
in interface java.util.Map<java.lang.Object,java.lang.Object>
hashCode
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
public boolean equals(java.lang.Object obj)
equals
in interface java.util.Map<java.lang.Object,java.lang.Object>
equals
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
public java.util.Enumeration<java.lang.Object> keys()
keys
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
public java.util.Iterator<java.lang.Object> keyIterator()
public java.util.List<java.lang.Object> keyList()
public void load(java.io.InputStream inStream) throws java.io.IOException
The input stream remains open after this method returns.
load
in class java.util.Properties
inStream
- an input stream.
java.io.IOException
- if an error occurred when reading from
the input stream.public void load(java.io.InputStream is, java.lang.String encoding) throws java.io.IOException
The input stream remains open after this method returns.
is
- an input stream.encoding
- a character encoding scheme.
java.io.IOException
- if an error occurred when reading from
the input stream.public void store(java.io.OutputStream os, java.lang.String header) throws java.io.IOException
The output stream remains open after this method returns.
store
in class java.util.Properties
os
- an output stream.header
- a description of the property list.
java.io.IOException
- if an error occurred when writing to
the output stream.public void store(java.io.OutputStream os, java.lang.String header, java.lang.String encoding) throws java.io.IOException
The output stream remains open after this method returns.
os
- an output stream.header
- a description of the property list.encoding
- a character encoding scheme.
java.io.IOException
- if an error occurred when writing to
the output stream.public java.util.Enumeration<java.lang.Object> propertyNames()
propertyNames
in class java.util.Properties
public java.lang.Object setProperty(java.lang.String key, java.lang.String value)
setProperty
in class java.util.Properties
key
- the key to be placed into this property list.value
- the value corresponding to key.
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
Maps the specified key to the specified value in this ordered properties. Neither the key nor the value can be null.
The value can be retrieved by calling the get method with a key that is equal to the original key.
put
in interface java.util.Map<java.lang.Object,java.lang.Object>
put
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
key
- a key.value
- a value.
java.lang.NullPointerException
- if the key or value is
null.Object.equals(Object)
,
Hashtable.get(Object)
public 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>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |