
org.openclover.util.Sets Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clover Show documentation
Show all versions of clover Show documentation
Clover is an award winning code coverage and testing tool for Java and Groovy.
It integrates easily with Maven, Ant, Grails, Eclipse and IntelliJ IDEA
as well as with continuous integration servers such as Bamboo, Jenkins or Hudson.
Note: before Clover 4.0 this artifact was named com.cenqua.clover:clover.
The newest version!
package org.openclover.util;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.TreeSet;
public abstract class Sets {
public static HashSet newHashSet() {
return new HashSet<>();
}
@SafeVarargs
public static HashSet newHashSet(S... items) {
final HashSet set = new HashSet<>(items.length);
Collections.addAll(set, items);
return set;
}
public static HashSet newHashSet(Collection extends S> items) {
return new HashSet<>(items);
}
public static LinkedHashSet newLinkedHashSet() {
return new LinkedHashSet<>();
}
public static LinkedHashSet newLinkedHashSet(Collection extends S> items) {
return new LinkedHashSet<>(items);
}
public static > TreeSet newTreeSet() {
return new TreeSet<>();
}
public static TreeSet newTreeSet(Comparator super S> comparator) {
return new TreeSet<>(comparator);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy