Class CrossProduct


  • @API(EXPERIMENTAL)
    public class CrossProduct
    extends Object
    Utility class to provide helpers related to enumeration of cross products.
    • Method Detail

      • crossProduct

        public static <T> EnumeratingIterable<T> crossProduct​(@Nonnull
                                                              List<Iterable<T>> sources)
        Create a EnumeratingIterable based on a set and a function describing the depends-on relationships between items in the given set.
        Type Parameters:
        T - type
        Parameters:
        sources - the list of collections to create the iterable over
        Returns:
        a new EnumeratingIterable that obeys the constraints as expressed in dependsOnFn in a sense that the iterators created by this iterator will not return orderings that violate the given depends-on constraints