com.espertech.esper.collection
Class NumberAscCombinationEnumeration
java.lang.Object
com.espertech.esper.collection.NumberAscCombinationEnumeration
- All Implemented Interfaces:
- java.util.Enumeration<int[]>
public class NumberAscCombinationEnumeration
- extends java.lang.Object
- implements java.util.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}
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NumberAscCombinationEnumeration
public NumberAscCombinationEnumeration(int n)
hasMoreElements
public boolean hasMoreElements()
- Specified by:
hasMoreElements
in interface java.util.Enumeration<int[]>
nextElement
public int[] nextElement()
- Specified by:
nextElement
in interface java.util.Enumeration<int[]>