Class SortedProperties

  • All Implemented Interfaces:
    Serializable, Cloneable, Map<Object,​Object>

    public class SortedProperties
    extends Properties
    This class is a sorted version of classical java.util.Properties. It is strongly inspired by http://forums.sun.com/thread.jspa?threadID=141144.
    Author:
    Sebastien Vincent, Damian Minkov
    See Also:
    Serialized Form
    • Constructor Detail

      • SortedProperties

        public SortedProperties()
    • Method Detail

      • keys

        public Enumeration<Object> keys()
        Gets an Enumeration of the keys in this Properties object. Contrary to the original Properties implementation, it forces the keys to be alphabetically sorted.
        Overrides:
        keys in class Properties
        Returns:
        an Enumeration of the keys in this Properties object
      • put

        public Object put​(Object key,
                          Object value)
        Does not allow putting empty String keys in this Properties object.
        Specified by:
        put in interface Map<Object,​Object>
        Overrides:
        put in class Properties
        Parameters:
        key - the key
        value - the value
        Returns:
        the previous value of the specified key in this Hashtable, or null if it did not have one