Package org.apache.commons.collections4.properties

# Class SortedProperties

java.lang.Object
java.util.Dictionary<Object,Object>
java.util.Hashtable<Object,Object>
java.util.Properties
org.apache.commons.collections4.properties.SortedProperties

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `Map<Object,Object>`

public class SortedProperties extends Properties
A drop-in replacement for `Properties` for sorting keys.

Overrides `Hashtable.keys()` to sort keys. Allows other methods on the superclass to work with sorted keys.

Since:
  4.2
See Also:
  - `SortedPropertiesFactory.INSTANCE`
  - Serialized Form

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface java.util.Map

  `Map.Entry<K,V>`

- ## Field Summary

  ### Fields inherited from class java.util.Properties

  `defaults`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SortedProperties()`
  Constructs a new instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Set<Map.Entry<Object,Object>>`
  `entrySet()`
  `void`
  `forEach(BiConsumer<? super Object,? super Object> action)`
  `Enumeration<Object>`
  `keys()`
  `Set<Object>`
  `keySet()`
  `Enumeration<?>`
  `propertyNames()`
  `Set<String>`
  `stringPropertyNames()`

  ### Methods inherited from class java.util.Properties

  `getProperty, getProperty, list, list, load, load, loadFromXML, save, setProperty, store, store, storeToXML, storeToXML`

  ### Methods inherited from class java.util.Hashtable

  `clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, equals, get, getOrDefault, hashCode, isEmpty, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### SortedProperties

    public SortedProperties()
    Constructs a new instance.

- ## Method Details

  - ### entrySet

    public Set<Map.Entry<Object,Object>> entrySet()
    Specified by:
      `entrySet` in interface `Map<Object,Object>`
    Overrides:
      `entrySet` in class `Hashtable<Object,Object>`

  - ### forEach

    public void forEach(BiConsumer<? super Object,? super Object> action)
    Specified by:
      `forEach` in interface `Map<Object,Object>`
    Overrides:
      `forEach` in class `Hashtable<Object,Object>`

  - ### keys

    public Enumeration<Object> keys()
    Overrides:
      `keys` in class `Hashtable<Object,Object>`

  - ### keySet

    public Set<Object> keySet()
    Specified by:
      `keySet` in interface `Map<Object,Object>`
    Overrides:
      `keySet` in class `Hashtable<Object,Object>`

  - ### propertyNames

    public Enumeration<?> propertyNames()
    Overrides:
      `propertyNames` in class `Properties`

  - ### stringPropertyNames

    public Set<String> stringPropertyNames()
    Overrides:
      `stringPropertyNames` in class `Properties`