| Constructor and Description |
|---|
FibonacciIterator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Determines whether the next Fibonacci number is available.
|
Long |
next()
Gets the next Fibonacci number in sequence.
|
void |
remove()
Removing a Fibonacci number is unsupported.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic boolean hasNext()
public Long next() throws NoSuchElementException
next in interface Iterator<Long>NoSuchElementException - When this method is called when there are no more Fibonacci numbers that fit
into a variable of type long.public void remove()
remove in interface Iterator<Long>UnsupportedOperationException - Always!Copyright © 2008–2018. All rights reserved.