Class UniquePropertiesCheck.UniqueProperties
- 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.UniquePropertiesCheck.UniqueProperties
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<java.lang.Object,java.lang.Object>
- Enclosing class:
- UniquePropertiesCheck
private static class UniquePropertiesCheck.UniqueProperties extends java.util.Properties
Properties subclass to store duplicated property keys in a separate map.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.util.concurrent.atomic.AtomicInteger>duplicatedKeysMap, holding duplicated keys and their count.private static longserialVersionUIDA unique serial version identifier.
-
Constructor Summary
Constructors Modifier Constructor Description privateUniqueProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.util.concurrent.atomic.AtomicInteger>getDuplicatedKeys()Retrieves a collections of duplicated properties keys.java.lang.Objectput(java.lang.Object key, java.lang.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 java.util.Map<java.lang.String,java.util.concurrent.atomic.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 java.lang.Object put(java.lang.Object key, java.lang.Object value)
Puts the value into properties by the key specified.- Specified by:
putin interfacejava.util.Map<java.lang.Object,java.lang.Object>- Overrides:
putin classjava.util.Properties
-
getDuplicatedKeys
public java.util.Map<java.lang.String,java.util.concurrent.atomic.AtomicInteger> getDuplicatedKeys()
Retrieves a collections of duplicated properties keys.- Returns:
- A collection of duplicated keys.
-
-