play.utils
Class OrderSafeProperties

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<java.lang.Object,java.lang.Object>
          extended by java.util.Properties
              extended by play.utils.OrderSafeProperties
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>

public class OrderSafeProperties
extends java.util.Properties

Custom impl of java.util.properties that preserves the key-order from the file and that reads the properties-file in utf-8

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
OrderSafeProperties()
           
 
Method Summary
 void clear()
           
 java.util.Set<java.util.Map.Entry<java.lang.Object,java.lang.Object>> entrySet()
           
 java.util.Enumeration<java.lang.Object> keys()
           
 java.util.Set<java.lang.Object> keySet()
           
 void load(java.io.InputStream inputStream)
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 void putAll(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> map)
           
 java.lang.Object remove(java.lang.Object o)
           
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
 
Methods inherited from class java.util.Hashtable
clone, contains, containsKey, containsValue, elements, equals, get, hashCode, isEmpty, rehash, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OrderSafeProperties

public OrderSafeProperties()
Method Detail

load

public void load(java.io.InputStream inputStream)
          throws java.io.IOException
Overrides:
load in class java.util.Properties
Throws:
java.io.IOException

keys

public java.util.Enumeration<java.lang.Object> keys()
Overrides:
keys in class java.util.Hashtable<java.lang.Object,java.lang.Object>

keySet

public java.util.Set<java.lang.Object> 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>

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>

remove

public java.lang.Object remove(java.lang.Object o)
Specified by:
remove in interface java.util.Map<java.lang.Object,java.lang.Object>
Overrides:
remove in class java.util.Hashtable<java.lang.Object,java.lang.Object>

clear

public void clear()
Specified by:
clear in interface java.util.Map<java.lang.Object,java.lang.Object>
Overrides:
clear in class java.util.Hashtable<java.lang.Object,java.lang.Object>

putAll

public void putAll(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> map)
Specified by:
putAll in interface java.util.Map<java.lang.Object,java.lang.Object>
Overrides:
putAll in class java.util.Hashtable<java.lang.Object,java.lang.Object>

entrySet

public java.util.Set<java.util.Map.Entry<java.lang.Object,java.lang.Object>> 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>


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly