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