Package ball.util.stream
Interface Permutations<T>
-
- Type Parameters:
T
- TheList
element type.
- All Superinterfaces:
AutoCloseable
,BaseStream<List<T>,Stream<List<T>>>
,Combinations<T>
,Stream<List<T>>
public interface Permutations<T> extends Combinations<T>
- Author:
- Allen D. Ball
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ball.util.stream.Combinations
Combinations.SpliteratorSupplier<T>
-
Nested classes/interfaces inherited from interface java.util.stream.Stream
Stream.Builder<T extends Object>
-
-
Method Summary
Static Methods Modifier and Type Method Description static <T> Stream<List<T>>
of(Collection<T> collection)
Method to get theStream
of permutations.static <T> Stream<List<T>>
of(Predicate<List<T>> predicate, Collection<T> collection)
Method to get theStream
of permutations.-
Methods inherited from interface java.util.stream.BaseStream
close, isParallel, iterator, onClose, parallel, sequential, spliterator, unordered
-
Methods inherited from interface java.util.stream.Stream
allMatch, anyMatch, collect, collect, count, distinct, dropWhile, filter, findAny, findFirst, flatMap, flatMapToDouble, flatMapToInt, flatMapToLong, forEach, forEachOrdered, limit, map, mapToDouble, mapToInt, mapToLong, max, min, noneMatch, peek, reduce, reduce, reduce, skip, sorted, sorted, takeWhile, toArray, toArray
-
-
-
-
Method Detail
-
of
static <T> Stream<List<T>> of(Collection<T> collection)
Method to get theStream
of permutations.- Type Parameters:
T
- TheCollection
element type.- Parameters:
collection
- TheCollection
of elements to permute.- Returns:
- The
Stream
of permutations.
-
of
static <T> Stream<List<T>> of(Predicate<List<T>> predicate, Collection<T> collection)
Method to get theStream
of permutations.- Type Parameters:
T
- TheCollection
element type.- Parameters:
predicate
- The optionalPredicate
(may benull
) specifying prerequisite requirement(s) for the combinations. Any path that does not match will be pruned.collection
- TheCollection
of elements to permute.- Returns:
- The
Stream
of permutations.
-
-