Package ball.util.stream
Interface Permutations<T>
-
- Type Parameters:
T- TheListelement 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 theStreamof permutations.static <T> Stream<List<T>>of(Predicate<List<T>> predicate, Collection<T> collection)Method to get theStreamof 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 theStreamof permutations.- Type Parameters:
T- TheCollectionelement type.- Parameters:
collection- TheCollectionof elements to permute.- Returns:
- The
Streamof permutations.
-
of
static <T> Stream<List<T>> of(Predicate<List<T>> predicate, Collection<T> collection)
Method to get theStreamof permutations.- Type Parameters:
T- TheCollectionelement type.- Parameters:
predicate- The optionalPredicate(may benull) specifying prerequisite requirement(s) for the combinations. Any path that does not match will be pruned.collection- TheCollectionof elements to permute.- Returns:
- The
Streamof permutations.
-
-