Package org.apache.commons.math3.util
Class Combinations.SingletonIterator
- java.lang.Object
-
- org.apache.commons.math3.util.Combinations.SingletonIterator
-
- All Implemented Interfaces:
java.util.Iterator<int[]>
- Enclosing class:
- Combinations
private static class Combinations.SingletonIterator extends java.lang.Object implements java.util.Iterator<int[]>Iterator with just one element to handle degenerate cases (full array, empty array) for combination iterator.
-
-
Constructor Summary
Constructors Constructor Description SingletonIterator(int[] singleton)Create a singleton iterator providing the given array.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()int[]next()voidremove()Not supported
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<int[]>- Returns:
- True until next is called the first time, then false
-
next
public int[] next()
- Specified by:
nextin interfacejava.util.Iterator<int[]>- Returns:
- the singleton in first activation; throws NSEE thereafter
-
remove
public void remove()
Not supported- Specified by:
removein interfacejava.util.Iterator<int[]>
-
-