Package edu.umd.cs.findbugs.config
Class SortedProperties
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Object,
Object>
- Author:
- pugh
- See Also:
-
Field Summary
Fields inherited from class java.util.Properties
defaults
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionkeys()
Overriden to be able to write properties sorted by keys to the diskstatic Enumeration
<?> To be compatible with version control systems, we need to sort properties before storing them to disk.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, keySet, 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 Details
-
SortedProperties
public SortedProperties()
-
-
Method Details
-
keys
Overriden to be able to write properties sorted by keys to the disk- Overrides:
keys
in classProperties
- See Also:
-
sortKeys
To be compatible with version control systems, we need to sort properties before storing them to disk. Otherwise each change may lead to problems by diff against previous version - because Property entries are randomly distributed (it's a map).- Parameters:
keySet
- non null set instance to sort- Returns:
- non null list which contains all given keys, sorted lexicographically. The list may be empty if given set was empty
-