| |
|
| java.lang.Object org.jfree.util.ReadOnlyIterator
ReadOnlyIterator | public class ReadOnlyIterator implements Iterator(Code) | | Protects an given iterator by preventing calls to remove().
author: Thomas Morgner |
Method Summary | |
public boolean | hasNext() Returns true if the iteration has more elements. | public Object | next() Returns the next element in the iteration. | public void | remove() Throws UnsupportedOperationException . |
ReadOnlyIterator | public ReadOnlyIterator(Iterator it)(Code) | | Creates a new read-only iterator for the given iterator.
Parameters: it - the iterator. |
hasNext | public boolean hasNext()(Code) | | Returns true if the iteration has more elements. (In other
words, returns true if next would return an element
rather than throwing an exception.)
true if the iterator has more elements. |
next | public Object next()(Code) | | Returns the next element in the iteration.
Throws NoSuchElementException when iteration has no more elements.
the next element in the iteration. |
remove | public void remove()(Code) | | Throws UnsupportedOperationException .
|
|
|
|