Class OrderedPropertiesCheck.SequencedProperties
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<Object,Object>
-
- java.util.Properties
-
- com.puppycrawl.tools.checkstyle.checks.OrderedPropertiesCheck.SequencedProperties
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Object,Object>
- Enclosing class:
- OrderedPropertiesCheck
private static final class OrderedPropertiesCheck.SequencedProperties extends Properties
Private property implementation that keeps order of properties like in file.
-
-
Field Summary
Fields Modifier and Type Field Description private List<Object>
keyList
Holding the keys in the same order as in the file.private static long
serialVersionUID
A unique serial version identifier.-
Fields inherited from class java.util.Properties
defaults
-
-
Constructor Summary
Constructors Modifier Constructor Description private
SequencedProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Enumeration<Object>
keys()
Returns a copy of the keys.Object
put(Object key, Object value)
Puts the value into list by its key.-
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, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
A unique serial version identifier.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SequencedProperties
private SequencedProperties()
-
-
Method Detail
-
keys
public Enumeration<Object> keys()
Returns a copy of the keys.- Overrides:
keys
in classProperties
-
put
public Object put(Object key, Object value)
Puts the value into list by its key.- Specified by:
put
in interfaceMap<Object,Object>
- Overrides:
put
in classProperties
- Parameters:
key
- the hashtable keyvalue
- the value- Returns:
- the previous value of the specified key in this hashtable, or null if it did not have one
- Throws:
NullPointerException
- - if the key or value is null
-
-