T - 节点类型public abstract class ComputeIterator<T> extends Object implements Iterator<T>
computeNext()计算下一个节点,即可完成节点遍历
当调用hasNext()时将此方法产生的节点缓存,直到调用next()取出
当无下一个节点时,须返回null表示遍历结束| Constructor and Description |
|---|
ComputeIterator() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract T |
computeNext()
|
void |
finish()
手动结束遍历器,用于关闭操作等
|
boolean |
hasNext() |
T |
next() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, removeCopyright © 2021. All rights reserved.