Class NumberAscCombinationEnumeration
java.lang.Object
com.espertech.esper.common.internal.collection.NumberAscCombinationEnumeration
- All Implemented Interfaces:
Enumeration<int[]>
Provides an enumeration of each combination of numbers between zero and N-1
with N must be at least 1,
with each combination cannot have duplicates,
with each combination at least one element,
with the longest combination gets returned first and the least long combination of the highest N-1 value last.
For example, for N=3:
{0, 1, 2} {0, 1} {0, 2} {1, 2} {0} {1} {2}
-
Constructor Details
-
NumberAscCombinationEnumeration
public NumberAscCombinationEnumeration(int n)
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()- Specified by:
hasMoreElements
in interfaceEnumeration<int[]>
-
nextElement
public int[] nextElement()- Specified by:
nextElement
in interfaceEnumeration<int[]>
-