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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, remove
Copyright © 2024. All rights reserved.