T
- The List
element type.public interface Combinations<T> extends Stream<List<T>>
Modifier and Type | Interface and Description |
---|---|
static class |
Combinations.SpliteratorSupplier<T>
|
Stream.Builder<T>
Modifier and Type | Method and Description |
---|---|
static <T> Stream<List<T>> |
of(int size,
Collection<T> collection)
Method to get the
Stream of combinations. |
static <T> Stream<List<T>> |
of(int size0,
int sizeN,
Predicate<List<T>> predicate,
Collection<T> collection)
Method to get the
Stream of combinations. |
allMatch, anyMatch, builder, collect, collect, concat, count, distinct, empty, filter, findAny, findFirst, flatMap, flatMapToDouble, flatMapToInt, flatMapToLong, forEach, forEachOrdered, generate, iterate, limit, map, mapToDouble, mapToInt, mapToLong, max, min, noneMatch, of, of, peek, reduce, reduce, reduce, skip, sorted, sorted, toArray, toArray
close, isParallel, iterator, onClose, parallel, sequential, spliterator, unordered
static <T> Stream<List<T>> of(int size0, int sizeN, Predicate<List<T>> predicate, Collection<T> collection)
Stream
of combinations. Combinations will
be streamed largest to smallest or smallest to largest depending on
the relative magnitude of size0
and sizeN
. E.g., to
stream largest to smallest specify sizeN
that is greater than
size0
.T
- The Collection
element type.size0
- The combination size range start
(inclusive).sizeN
- The combination size range end (inclusive).predicate
- The optional Predicate
(may be
null
) specifying prerequisite
requirement(s) for the combinations. Any
path that does not match will be pruned.collection
- The Collection
of elements to
permute.Stream
of combinations.static <T> Stream<List<T>> of(int size, Collection<T> collection)
Stream
of combinations.T
- The Collection
element type.size
- The combination size.collection
- The Collection
of elements to
permute.Stream
of combinations.Copyright © 2015–2020 Allen D. Ball. All rights reserved.