// "Fix all 'Redundant 'Collection.addAll()' call' problems in file" "true" import java.util.*; import java.util.concurrent.ConcurrentSkipListMap; import java.util.concurrent.PriorityBlockingQueue; public class InheritComparator { public static void main(String[] args) { SortedSet c1 = new TreeSet<>(Comparator.reverseOrder()); Collection c2 = new TreeSet<>(Comparator.reverseOrder()); Collection c3 = new HashSet<>(); Collection c4 = new PriorityQueue<>(); Collection c5 = new PriorityBlockingQueue<>(); Collection hs1 = new HashSet<>(c1); Collection hs2 = new HashSet<>(c2); Collection hs3 = new HashSet<>(c3); Collection hs4 = new HashSet<>(c4); Collection hs5 = new HashSet<>(c5); Collection ts1 = new TreeSet<>(); ts1.addAll(c1); Collection ts2 = new TreeSet<>(c2); Collection ts3 = new TreeSet<>(c3); Collection ts4 = new TreeSet<>(c4); Collection ts5 = new TreeSet<>(c5); Collection pq1 = new PriorityQueue<>(); pq1.addAll(c1); Collection pq2 = new PriorityQueue<>(); pq2.addAll(c2); Collection pq3 = new PriorityQueue<>(c3); Collection pq4 = new PriorityQueue<>(); pq4.addAll(c4); Collection pq5 = new PriorityQueue<>(c5); Collection pbq1 = new PriorityBlockingQueue<>(); pbq1.addAll(c1); Collection pbq2 = new PriorityBlockingQueue<>(); pbq2.addAll(c2); Collection pbq3 = new PriorityBlockingQueue<>(c3); Collection pbq4 = new PriorityBlockingQueue<>(c4); Collection pbq5 = new PriorityBlockingQueue<>(); pbq5.addAll(c5); SortedMap m1 = new TreeMap<>(Comparator.reverseOrder()); Map m2 = new TreeMap<>(Comparator.reverseOrder()); Map tm1 = new TreeMap<>(); tm1.putAll(m1); Map tm2 = new TreeMap<>(m2); Map cslm1 = new ConcurrentSkipListMap<>(); cslm1.putAll(m1); Map cslm2 = new ConcurrentSkipListMap<>(m2); } }