Package play.utils

Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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

        clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, list, list, load, loadFromXML, merge, propertyNames, putIfAbsent, rehash, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, 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.Properties
      • 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.Properties
      • 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.Properties
      • 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.Properties
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<java.lang.Object,​java.lang.Object>
        Overrides:
        clear in class java.util.Properties
      • 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.Properties
      • 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.Properties