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 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>keyListHolding the keys in the same order than in the file.private static longserialVersionUIDA unique serial version identifier.
-
Constructor Summary
Constructors Modifier Constructor Description privateSequencedProperties()
-
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.Objectput(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 than 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:
keysin 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:
putin interfacejava.util.Map<java.lang.Object,java.lang.Object>- Overrides:
putin 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
-
-