public static class Combinations.OfRange extends java.lang.Object implements java.lang.Iterable<IntIndexable>
The iterator will return an indexable with integer values, and you can
use these values as indices into any set you have, although in most cases
using the enclosing class Combinations
is simpler because it already
handles this for you.
Constructor and Description |
---|
OfRange(int n,
int k)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getSize()
Get the size of the range.
|
java.util.Iterator<IntIndexable> |
iterator() |
public OfRange(int n, int k)
n
- size of the range, non-negativek
- size of the subset to be chosen, non-negative and not more than n
public int getSize()
@NotNull public java.util.Iterator<IntIndexable> iterator()
iterator
in interface java.lang.Iterable<IntIndexable>