|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--lima.mathematical.factorisation.trialdivision.EratosthenesSieve.Iterator
An object of this class is created by a Sieve of Eratosthenes object. It will iteratively supply each of those prime numbers that were generated when the parent sieve object was initially constructed, in the order of increasing size.
| Method Summary | |
boolean |
hasNext()
Determine whether or not an iterator object is able to supply another prime number. |
int |
next()
Obtain the next prime number from an iterator object assuming another prime number is available. |
void |
reset()
Reset an iterator object, so that the next prime number to be supplied will be the first prime number available from the parent sieve object (starting from the lowest). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public boolean hasNext()
public int next()
java.lang.IllegalStateExceptionpublic void reset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||