info.magnolia.cms.util
Class OrderedProperties
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
info.magnolia.cms.util.OrderedProperties
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>
public class OrderedProperties
- extends java.util.Properties
Subclass of java.util.Properties which keeps the order in which properties were loaded,
by delegating to a LinkedHashMap.
Warning: only the java.util.Map interface methods have been
overloaded, so be weary when using java.util.Properties specific methods. (load, save,
getProperty and setProperty are working.) (getProperty had to be explicitly overloaded
too)
The equals() method respects the Map.equals() contract, since the entrySet() method is
delegating to the LinkedHashMap.
- Version:
- $Id: $
- Author:
- philipp
- See Also:
- Serialized Form
Fields inherited from class java.util.Properties |
defaults |
Method Summary |
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object value)
|
java.util.Set |
entrySet()
|
java.lang.Object |
get(java.lang.Object key)
|
java.lang.String |
getProperty(java.lang.String key)
|
boolean |
isEmpty()
|
java.util.Set |
keySet()
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
int |
size()
|
java.util.Collection |
values()
|
Methods inherited from class java.util.Properties |
getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, elements, equals, hashCode, keys, putAll, rehash, remove, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
OrderedProperties
public OrderedProperties()
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
- Specified by:
put
in interface java.util.Map<java.lang.Object,java.lang.Object>
- Overrides:
put
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
get
in interface java.util.Map<java.lang.Object,java.lang.Object>
- Overrides:
get
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
getProperty
public java.lang.String getProperty(java.lang.String key)
- Overrides:
getProperty
in class java.util.Properties
containsValue
public boolean containsValue(java.lang.Object value)
- Specified by:
containsValue
in interface java.util.Map<java.lang.Object,java.lang.Object>
- Overrides:
containsValue
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKey
in interface java.util.Map<java.lang.Object,java.lang.Object>
- Overrides:
containsKey
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
entrySet
public java.util.Set entrySet()
- Specified by:
entrySet
in interface java.util.Map<java.lang.Object,java.lang.Object>
- Overrides:
entrySet
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
keySet
public java.util.Set keySet()
- Specified by:
keySet
in interface java.util.Map<java.lang.Object,java.lang.Object>
- Overrides:
keySet
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
values
public java.util.Collection values()
- Specified by:
values
in interface java.util.Map<java.lang.Object,java.lang.Object>
- Overrides:
values
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
size
public int size()
- Specified by:
size
in interface java.util.Map<java.lang.Object,java.lang.Object>
- Overrides:
size
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface java.util.Map<java.lang.Object,java.lang.Object>
- Overrides:
isEmpty
in class java.util.Hashtable<java.lang.Object,java.lang.Object>
Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.