public class IteratorChain
extends java.lang.Object
implements java.util.Iterator
| 构造器和说明 |
|---|
IteratorChain() |
IteratorChain(java.util.Iterator[] iteratorArray)
Construct an IteratorChain with a single Iterator.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
hasNext()
Return true if any Iterator in the IteratorChain has a remaining element.
|
java.lang.Object |
next()
Returns the next Object of the current Iterator
|
void |
remove()
Removes from the underlying collection the last element
returned by the Iterator.
|
int |
size()
Number of Iterators in the current IteratorChain.
|
public IteratorChain()
public IteratorChain(java.util.Iterator[] iteratorArray)
iteratorArray - iterator Array will be used in the IteratorChainjava.lang.NullPointerException - if the iterator is nullpublic int size()
public boolean hasNext()
hasNext 在接口中 java.util.Iteratorpublic java.lang.Object next()
next 在接口中 java.util.Iteratorjava.util.NoSuchElementException - if all the Iterators are exhaustedpublic void remove()
remove 在接口中 java.util.Iteratorjava.lang.UnsupportedOperationException - if the remove operator is not supported by the underlying Iteratorjava.lang.IllegalStateException - if the next method has not yet been called, or the remove method has
already been called after the last call to the next method.