Class Sets
java.lang.Object
com.github.andrewoma.dexx.collection.Sets
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)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()private static <E> Set<E> construct(E... es) static <E> @NotNull Set<E> copyOf(E[] es) static <E> @NotNull Set<E> static <E> @NotNull Set<E> static <E> @NotNull Set<E> copyOfTraversable(Traversable<E> traversable) static <E> @NotNull BuilderFactory<E, Set<E>> factory()static <E> @NotNull Set<E> of()static <E> @NotNull Set<E> of(E t) static <E> @NotNull Set<E> of(E e1, E e2) static <E> @NotNull Set<E> of(E e1, E e2, E e3) static <E> @NotNull Set<E> of(E e1, E e2, E e3, E e4) static <E> @NotNull Set<E> of(E e1, E e2, E e3, E e4, E e5) static <E> @NotNull Set<E> of(E e1, E e2, E e3, E e4, E e5, E e6) static <E> @NotNull Set<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7) static <E> @NotNull Set<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8) static <E> @NotNull Set<E> of(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9) static <E> @NotNull 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> @NotNull 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)
-
Constructor Details
-
Sets
private Sets()
-
-
Method Details
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
of
@NotNull public static <E> @NotNull 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> @NotNull 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) -
construct
-
copyOf
-
copyOf
-
copyOf
-
copyOfTraversable
-
factory
-
builder
-