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 com.google.common.collect.Multiset<java.lang.String>
duplicatedKeys
Multiset, holding duplicated keys.private static long
serialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description private
UniqueProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.Multiset<java.lang.String>
getDuplicatedKeys()
Retrieves a collections of duplicated properties keys.java.lang.Object
put(java.lang.Object key, java.lang.Object value)
-
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
- See Also:
- Constant Field Values
-
duplicatedKeys
private final com.google.common.collect.Multiset<java.lang.String> duplicatedKeys
Multiset, holding duplicated keys. Keys are added here only if they already exist in Properties' inner map.
-
-
Method Detail
-
put
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
- Specified by:
put
in interfacejava.util.Map<java.lang.Object,java.lang.Object>
- Overrides:
put
in classjava.util.Properties
-
getDuplicatedKeys
public com.google.common.collect.Multiset<java.lang.String> getDuplicatedKeys()
Retrieves a collections of duplicated properties keys.- Returns:
- A collection of duplicated keys.
-
-