public final class Sets
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
static <T> java.util.Set<T> |
difference(java.util.Set<T> left,
java.util.Set<T> right) |
The relative complement, or difference, of the specified left and right set.
|
static <T> boolean |
haveEmptyIntersection(java.util.Set<T> left,
java.util.Set<T> right) |
|
static <T> java.util.Set<T> |
newConcurrentHashSet() |
|
static <T> java.util.HashSet<T> |
newHashSet(java.lang.Iterable<T> iterable) |
|
static <T> java.util.HashSet<T> |
newHashSet(java.util.Iterator<T> iterator) |
|
static <T> java.util.HashSet<T> |
newHashSet(T... elements) |
|
static <T> java.util.SortedSet<T> |
sortedDifference(java.util.Set<T> left,
java.util.Set<T> right) |
The relative complement, or difference, of the specified left and right set, returned as a sorted set.
|
static <T> java.util.Set<T> |
union(java.util.Set<T> left,
java.util.Set<T> right) |
public static <T> java.util.HashSet<T> newHashSet(java.util.Iterator<T> iterator)
public static <T> java.util.HashSet<T> newHashSet(java.lang.Iterable<T> iterable)
public static <T> java.util.HashSet<T> newHashSet(T... elements)
public static <T> java.util.Set<T> newConcurrentHashSet()
public static <T> boolean haveEmptyIntersection(java.util.Set<T> left, java.util.Set<T> right)
public static <T> java.util.Set<T> difference(java.util.Set<T> left, java.util.Set<T> right)
T
- the type of the elements of the setsleft
- the left setright
- the right setpublic static <T> java.util.SortedSet<T> sortedDifference(java.util.Set<T> left, java.util.Set<T> right)
T
- the type of the elements of the setsleft
- the left setright
- the right setpublic static <T> java.util.Set<T> union(java.util.Set<T> left, java.util.Set<T> right)