Class OrderedPropertiesCheck.SequencedProperties
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<java.lang.Object,java.lang.Object>
-
- java.util.Properties
-
- com.puppycrawl.tools.checkstyle.checks.OrderedPropertiesCheck.SequencedProperties
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map<java.lang.Object,java.lang.Object>
- Enclosing class:
- OrderedPropertiesCheck
private static final class OrderedPropertiesCheck.SequencedProperties extends java.util.Properties
Private property implementation that keeps order of properties like in file.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.Object>
keyList
Holding the keys in the same order as in the file.private static long
serialVersionUID
A unique serial version identifier.
-
Constructor Summary
Constructors Modifier Constructor Description private
SequencedProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Enumeration<java.lang.Object>
keys()
Returns a copy of the keys.java.lang.Object
put(java.lang.Object key, java.lang.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
-
keyList
private final java.util.List<java.lang.Object> keyList
Holding the keys in the same order as in the file.
-
-
Constructor Detail
-
SequencedProperties
private SequencedProperties()
-
-
Method Detail
-
keys
public java.util.Enumeration<java.lang.Object> keys()
Returns a copy of the keys.- Overrides:
keys
in classjava.util.Properties
-
put
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
Puts the value into list by its key.- Specified by:
put
in interfacejava.util.Map<java.lang.Object,java.lang.Object>
- Overrides:
put
in classjava.util.Properties
- 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:
java.lang.NullPointerException
- - if the key or value is null
-
-