Class ChooseK
- java.lang.Object
-
- com.apple.foundationdb.record.query.plan.temp.ChooseK
-
@API(EXPERIMENTAL) public class ChooseK extends Object
Utility class to provide helpers related to enumeration of cross products.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> EnumeratingIterable<T>
chooseK(Collection<T> elements, int numberOfElementsToChoose)
Create aEnumeratingIterable
based on a set and a function describing the depends-on relationships between items in the given set.
-
-
-
Method Detail
-
chooseK
public static <T> EnumeratingIterable<T> chooseK(@Nonnull Collection<T> elements, int numberOfElementsToChoose)
Create aEnumeratingIterable
based on a set and a function describing the depends-on relationships between items in the given set.- Type Parameters:
T
- type- Parameters:
elements
- the list of collections to create the iterable overnumberOfElementsToChoose
- numberk
of elements to choose- Returns:
- a new
EnumeratingIterable
that obeys the constraints as expressed independsOnFn
in a sense that the iterators created by this iterator will not return orderings that violate the given depends-on constraints
-
-