- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<java.lang.Object,java.lang.Object>
-
- java.util.Properties
-
- util.io.PropertiesSorted
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map<java.lang.Object,java.lang.Object>
public class PropertiesSorted extends java.util.Properties
A class with alphabetically sorted properties in properties file.- Since:
- 4.1
- Author:
- René Mach
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PropertiesSorted()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
static PropertiesSorted
load(java.io.File source)
Loads properties from a properties file.boolean
store(java.io.File target, java.lang.String comments)
Stores properties to file.-
Methods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, 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
-
-
-
-
Method Detail
-
load
public static final PropertiesSorted load(java.io.File source)
Loads properties from a properties file.- Parameters:
source
- The properties file to load from.- Returns:
- The Properties loaded from the file.
-
entrySet
public java.util.Set<java.util.Map.Entry<java.lang.Object,java.lang.Object>> entrySet()
- Specified by:
entrySet
in interfacejava.util.Map<java.lang.Object,java.lang.Object>
- Overrides:
entrySet
in classjava.util.Properties
-
keySet
public java.util.Set<java.lang.Object> keySet()
- Specified by:
keySet
in interfacejava.util.Map<java.lang.Object,java.lang.Object>
- Overrides:
keySet
in classjava.util.Properties
-
keys
public java.util.Enumeration<java.lang.Object> keys()
- Overrides:
keys
in classjava.util.Properties
-
store
public final boolean store(java.io.File target, java.lang.String comments)
Stores properties to file.- Parameters:
target
- The target file to store the properties in.comments
- The comments for the properties file's header.- Returns:
true
if the properties could be stored,false
otherwise.
-
-