T
- the type of the iteratorpublic abstract class TryIterator<T> extends Object implements Iterator<T>
构造器和说明 |
---|
TryIterator() |
限定符和类型 | 方法和说明 |
---|---|
T |
current() |
protected T |
done()
Implementations of
tryNext() must call this method
when there are no more elements left in the iteration. |
boolean |
hasNext() |
T |
next() |
void |
remove()
Guaranteed to throw UnsupportedOperationException
|
protected abstract T |
tryNext()
Return the next element.
|
protected abstract T tryNext()
done()
when done, otherwise
infinite loop could occur. If this method throws an exception, any
further attempts to use the iterator would result in an
IllegalStateException
.done()
protected final T done()
tryNext()
must call this method
when there are no more elements left in the iteration.tryNext()
public final boolean hasNext()
public final T current()
Copyright © 2009 The Apache Software Foundation