public final class Combination extends Object
This class cannot be instantiated.
| Modifier and Type | Method and Description |
|---|---|
static <T> Stream<Set<T>> |
of(@NotNull Collection<T> items)
Creates and returns a stream of all possible combinations of the given elements.
|
static <T> Stream<Set<T>> |
of(@NotNull Stream<T> items)
Creates and returns a stream of all possible combinations of the given elements.
|
static <T> Stream<Set<T>> |
of(T... items)
Creates and returns a stream of all possible combinations of the given elements.
|
@SafeVarargs public static <T> Stream<Set<T>> of(@NotNull T... items)
The order of the combinations in the stream is unspecified.
T - element typeitems - the array of items to combineNullPointerException - if the provided items array is null.public static <T> Stream<Set<T>> of(@NotNull @NotNull Collection<T> items)
The order of the combinations in the stream is unspecified.
T - element typeitems - a collection of items to combineNullPointerException - if the provided items collection is null.public static <T> Stream<Set<T>> of(@NotNull @NotNull Stream<T> items)
The order of the combinations in the stream is unspecified.
It is unspecified if the method lazily consumes the provided stream before providing the result or not.
T - element typeitems - a stream of items to combineNullPointerException - if the provided items stream is null.Copyright © 2023. All rights reserved.