- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<Object,Object>
-
- java.util.Properties
-
- io.github.mmm.base.properties.SortedProperties
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Object,Object>
public class SortedProperties extends Properties
This class extendsProperties
and makes them sorted by theirkeys
. Sorting the properties is useful when changes shall be compared using diff-algorithms.- Since:
- 4.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.Properties
defaults
-
-
Constructor Summary
Constructors Constructor Description SortedProperties()
The constructor.SortedProperties(Properties defaults)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Enumeration<Object>
keys()
Set<Object>
keySet()
-
Methods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
-
-
-
-
Constructor Detail
-
SortedProperties
public SortedProperties()
The constructor.
-
SortedProperties
public SortedProperties(Properties defaults)
The constructor.- Parameters:
defaults
- are theProperties
to inherit as defaults.
-
-
Method Detail
-
keys
public Enumeration<Object> keys()
- Overrides:
keys
in classProperties
-
-