Class UniquePropertiesCheck.UniqueProperties
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<Object,Object>
-
- java.util.Properties
-
- com.puppycrawl.tools.checkstyle.checks.UniquePropertiesCheck.UniqueProperties
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Object,Object>
- Enclosing class:
- UniquePropertiesCheck
private static final class UniquePropertiesCheck.UniqueProperties extends Properties
Properties subclass to store duplicated property keys in a separate map.
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,AtomicInteger>
duplicatedKeys
Map, holding duplicated keys and their count.private static long
serialVersionUID
A unique serial version identifier.-
Fields inherited from class java.util.Properties
defaults
-
-
Constructor Summary
Constructors Modifier Constructor Description private
UniqueProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,AtomicInteger>
getDuplicatedKeys()
Retrieves a collections of duplicated properties keys.Object
put(Object key, Object value)
Puts the value into properties by the key specified.-
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, keys, 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
-
duplicatedKeys
private final Map<String,AtomicInteger> duplicatedKeys
Map, holding duplicated keys and their count. Keys are added here only if they already exist in Properties' inner map.
-
-
Constructor Detail
-
UniqueProperties
private UniqueProperties()
-
-
Method Detail
-
put
public Object put(Object key, Object value)
Puts the value into properties by the key specified.
-
getDuplicatedKeys
public Map<String,AtomicInteger> getDuplicatedKeys()
Retrieves a collections of duplicated properties keys.- Returns:
- A collection of duplicated keys.
-
-