public class Sets
extends java.lang.Object
Sets is the preferred method of constructing instances of Set.
HashSet is currently constructed in
all cases, however this may change in the future.
Sets is preferred for construction as:
HashSets)
| Modifier and Type | Method and Description |
|---|---|
static <E> Builder<E,Set<E>> |
builder() |
static <E> Set<E> |
copyOf(E[] es) |
static <E> Set<E> |
copyOf(java.lang.Iterable<E> iterable) |
static <E> Set<E> |
copyOf(java.util.Iterator<E> iterator) |
static <E> Set<E> |
copyOfTraversable(Traversable<E> traversable) |
static <E> BuilderFactory<E,Set<E>> |
factory() |
static <E> Set<E> |
of() |
static <E> Set<E> |
of(E t) |
static <E> Set<E> |
of(E e1,
E e2) |
static <E> Set<E> |
of(E e1,
E e2,
E e3) |
static <E> Set<E> |
of(E e1,
E e2,
E e3,
E e4) |
static <E> Set<E> |
of(E e1,
E e2,
E e3,
E e4,
E e5) |
static <E> Set<E> |
of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6) |
static <E> Set<E> |
of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6,
E e7) |
static <E> Set<E> |
of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6,
E e7,
E e8) |
static <E> Set<E> |
of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6,
E e7,
E e8,
E e9) |
static <E> Set<E> |
of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6,
E e7,
E e8,
E e9,
E e10) |
static <E> Set<E> |
of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6,
E e7,
E e8,
E e9,
E e10,
E... others) |
@NotNull public static <E> Set<E> of()
@NotNull public static <E> Set<E> of(E t)
@NotNull public static <E> Set<E> of(E e1, E e2)
@NotNull public static <E> Set<E> of(E e1, E e2, E e3)
@NotNull public static <E> Set<E> of(E e1, E e2, E e3, E e4)
@NotNull public static <E> Set<E> of(E e1, E e2, E e3, E e4, E e5)
@NotNull public static <E> Set<E> of(E e1, E e2, E e3, E e4, E e5, E e6)
@NotNull public static <E> Set<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7)
@NotNull public static <E> Set<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8)
@NotNull public static <E> Set<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9)
@NotNull public static <E> Set<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10)
@NotNull public static <E> Set<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10, E... others)
@NotNull public static <E> Set<E> copyOf(java.lang.Iterable<E> iterable)
@NotNull public static <E> Set<E> copyOf(java.util.Iterator<E> iterator)
@NotNull public static <E> Set<E> copyOf(E[] es)
@NotNull public static <E> Set<E> copyOfTraversable(Traversable<E> traversable)
@NotNull public static <E> BuilderFactory<E,Set<E>> factory()