| 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()
next in interface Iterator<Long>NoSuchElementException - When this method is called when there
are no more Fibonacci numbers.public void remove()
remove in interface Iterator<Long>UnsupportedOperationException - Always!Copyright © 2008–2017. All rights reserved.