Constructor and Description |
---|
LimitedIterator(Iterator<T> iter,
int maxItems)
Constructs an iterator for the first
maxItems tokens contained in
given iterator. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns
true if there is another item to return. |
T |
next()
Returns the next item from the reader.
|
void |
remove()
Throws an
UnsupportedOperationException if called. |
public boolean hasNext()
true
if there is another item to return.public T next()
public void remove()
UnsupportedOperationException
if called.Copyright © 2012. All Rights Reserved.