private static class Combinations.SingletonIterator
extends java.lang.Object
implements java.util.Iterator<int[]>
Modifier and Type | Field and Description |
---|---|
private boolean |
more
True on initialization, false after first call to next
|
private int[] |
singleton
Singleton array
|
Constructor and Description |
---|
SingletonIterator(int[] singleton)
Create a singleton iterator providing the given array.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
int[] |
next() |
void |
remove()
Not supported
|
private final int[] singleton
private boolean more
public SingletonIterator(int[] singleton)
singleton
- array returned by the iteratorpublic boolean hasNext()
hasNext
in interface java.util.Iterator<int[]>
public int[] next()
next
in interface java.util.Iterator<int[]>
public void remove()
remove
in interface java.util.Iterator<int[]>