public static class Permutations.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 Permutations
is simpler because it already
handles this for you.
Constructor and Description |
---|
OfRange(int size)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getSize()
Get the size of the range.
|
java.util.Iterator<IntIndexable> |
iterator() |
public OfRange(int size)
0
to size - 1
.size
- size of the range, non-negativepublic int getSize()
public java.util.Iterator<IntIndexable> iterator()
iterator
in interface java.lang.Iterable<IntIndexable>