Interface Combinations<T>

    • Method Detail

      • of

        static <T> Stream<List<T>> of​(int size0,
                                      int sizeN,
                                      Predicate<List<T>> predicate,
                                      Collection<T> collection)
        Method to get the 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.
        Type Parameters:
        T - The Collection element type.
        Parameters:
        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.
        Returns:
        The Stream of combinations.
      • of

        static <T> Stream<List<T>> of​(int size,
                                      Collection<T> collection)
        Method to get the Stream of combinations.
        Type Parameters:
        T - The Collection element type.
        Parameters:
        size - The combination size.
        collection - The Collection of elements to permute.
        Returns:
        The Stream of combinations.