Package com.github.hypfvieh.collections
Class LinkedProperties
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
com.github.hypfvieh.collections.LinkedProperties
- All Implemented Interfaces:
Serializable,Cloneable,Map<Object,Object>
Subclass of Properties that returns keys in insertion order by
keeping an internal insertion order set of keys updated on each
write operation (put, putAll, clear, remove). DOES NOT CONTROL
the usage of
Hashtable.entrySet() which allows
write operations as well.- See Also:
-
Field Summary
Fields inherited from class java.util.Properties
defaults -
Constructor Summary
ConstructorsConstructorDescriptionLinkedProperties(InputStream _inputStream) Constructor that reads a property list (key and element pairs) from the input byte stream.LinkedProperties(Properties _defaults) -
Method Summary
Methods inherited from class java.util.Properties
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, putAll, putIfAbsent, rehash, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
-
Constructor Details
-
LinkedProperties
public LinkedProperties() -
LinkedProperties
-
LinkedProperties
Constructor that reads a property list (key and element pairs) from the input byte stream.- Parameters:
_inputStream- the input stream- Throws:
IOException- if an error occurred when reading from the input stream- See Also:
-
-
Method Details
-
put
-
keys
Overrides keys() in order to return an insertion order enumeration. As this method is called by the various store methods in Properties, output to file etc. will be sorted accordingly.- Overrides:
keysin classProperties
-
remove
-
clear
public final void clear()
-