Package org.apache.commons.math3.util
Class Combinations.SingletonIterator
java.lang.Object
org.apache.commons.math3.util.Combinations.SingletonIterator
- All Implemented Interfaces:
Iterator<int[]>
- Enclosing class:
Combinations
Iterator with just one element to handle degenerate cases (full array,
empty array) for combination iterator.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSingletonIterator
(int[] singleton) Create a singleton iterator providing the given array. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
singleton
private final int[] singletonSingleton array -
more
private boolean moreTrue on initialization, false after first call to next
-
-
Constructor Details
-
SingletonIterator
SingletonIterator(int[] singleton) Create a singleton iterator providing the given array.- Parameters:
singleton
- array returned by the iterator
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
public int[] next() -
remove
public void remove()Not supported
-