Class SortedProperties
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<java.lang.Object,java.lang.Object>
-
- java.util.Properties
-
- de.alpharogroup.collections.properties.SortedProperties
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<java.lang.Object,java.lang.Object>
- Direct Known Subclasses:
IndexSortedProperties
public class SortedProperties extends java.util.PropertiesThe classSortedPropertiesextends Properties and adds sort functionality for the keys.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SortedProperties()Instantiates a newSortedProperties.SortedProperties(java.util.Properties defaults)Instantiates a newSortedProperties.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Comparator<java.lang.Object>getComparator()Gets theComparatorfor sort thisSortedProperties.java.util.Enumeration<java.lang.Object>keys()java.util.Set<java.lang.Object>keySet()protected java.util.Comparator<java.lang.Object>newComparator()Factory method for creating a newComparatorfor sort thisSortedProperties.static SortedPropertiesof()Factory method to create a newSortedPropertiesobject.static SortedPropertiesof(java.util.Properties defaults)Factory method to create a newSortedPropertiesobject.static SortedPropertiesof(java.util.Properties defaults, java.util.Comparator<java.lang.Object> comparator)Factory method to create a newSortedPropertiesobject.java.util.Enumeration<?>propertyNames()-
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, 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()
Instantiates a newSortedProperties.
-
SortedProperties
public SortedProperties(java.util.Properties defaults)
Instantiates a newSortedProperties.- Parameters:
defaults- the defaults
-
-
Method Detail
-
of
public static SortedProperties of()
Factory method to create a newSortedPropertiesobject.- Returns:
- the new
SortedPropertiesobject
-
of
public static SortedProperties of(java.util.Properties defaults)
Factory method to create a newSortedPropertiesobject.- Parameters:
defaults- the defaults- Returns:
- the new
SortedPropertiesobject
-
of
public static SortedProperties of(java.util.Properties defaults, java.util.Comparator<java.lang.Object> comparator)
Factory method to create a newSortedPropertiesobject.- Parameters:
defaults- the defaultscomparator- the comparator- Returns:
- the new
SortedPropertiesobject
-
getComparator
public java.util.Comparator<java.lang.Object> getComparator()
Gets theComparatorfor sort thisSortedProperties.- Returns:
- The
Comparator.
-
keys
public java.util.Enumeration<java.lang.Object> keys()
- Overrides:
keysin classjava.util.Properties
-
keySet
public java.util.Set<java.lang.Object> keySet()
- Specified by:
keySetin interfacejava.util.Map<java.lang.Object,java.lang.Object>- Overrides:
keySetin classjava.util.Properties
-
newComparator
protected java.util.Comparator<java.lang.Object> newComparator()
Factory method for creating a newComparatorfor sort thisSortedProperties. This method is invoked in the methods keys and can be overridden so users can provide their own version of aComparator.- Returns:
- the new
Comparator.
-
propertyNames
public java.util.Enumeration<?> propertyNames()
- Overrides:
propertyNamesin classjava.util.Properties
-
-