com.github.andrewoma.dexx.collection
Class Sets
java.lang.Object
com.github.andrewoma.dexx.collection.Sets
public class Sets
- extends 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:
- It works better in languages that support type inference
- It allows future optimisations (e.g. small sets be dedicated classes which are then upgraded to
HashSets)
|
Method Summary |
static
|
builder()
|
static
|
copyOf(E[] es)
|
static
|
copyOf(Iterable<E> iterable)
|
static
|
copyOf(Iterator<E> iterator)
|
static
|
copyOfTraversable(Traversable<E> traversable)
|
static
|
factory()
|
static
|
of()
|
static
|
of(E t)
|
static
|
of(E e1,
E e2)
|
static
|
of(E e1,
E e2,
E e3)
|
static
|
of(E e1,
E e2,
E e3,
E e4)
|
static
|
of(E e1,
E e2,
E e3,
E e4,
E e5)
|
static
|
of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6)
|
static
|
of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6,
E e7)
|
static
|
of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6,
E e7,
E e8)
|
static
|
of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6,
E e7,
E e8,
E e9)
|
static
|
of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6,
E e7,
E e8,
E e9,
E e10)
|
static
|
of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6,
E e7,
E e8,
E e9,
E e10,
E... others)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
of
@NotNull
public static <E> Set<E> of()
of
@NotNull
public static <E> Set<E> of(E t)
of
@NotNull
public static <E> Set<E> of(E e1,
E e2)
of
@NotNull
public static <E> Set<E> of(E e1,
E e2,
E e3)
of
@NotNull
public static <E> Set<E> of(E e1,
E e2,
E e3,
E e4)
of
@NotNull
public static <E> Set<E> of(E e1,
E e2,
E e3,
E e4,
E e5)
of
@NotNull
public static <E> Set<E> of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6)
of
@NotNull
public static <E> Set<E> of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6,
E e7)
of
@NotNull
public static <E> Set<E> of(E e1,
E e2,
E e3,
E e4,
E e5,
E e6,
E e7,
E e8)
of
@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)
of
@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)
of
@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)
copyOf
@NotNull
public static <E> Set<E> copyOf(Iterable<E> iterable)
copyOf
@NotNull
public static <E> Set<E> copyOf(Iterator<E> iterator)
copyOf
@NotNull
public static <E> Set<E> copyOf(E[] es)
copyOfTraversable
@NotNull
public static <E> Set<E> copyOfTraversable(Traversable<E> traversable)
factory
@NotNull
public static <E> BuilderFactory<E,Set<E>> factory()
builder
@NotNull
public static <E> Builder<E,Set<E>> builder()
Copyright © 2014. All Rights Reserved.