Package org.jfree.util
Class ReadOnlyIterator
java.lang.Object
org.jfree.util.ReadOnlyIterator
- All Implemented Interfaces:
Iterator
Protects an given iterator by preventing calls to remove().
- Author:
- Thomas Morgner
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new read-only iterator for the given iterator. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
ReadOnlyIterator
Creates a new read-only iterator for the given iterator.- Parameters:
it
- the iterator.
-
-
Method Details
-
hasNext
Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.) -
next
Returns the next element in the iteration. Throws NoSuchElementException when iteration has no more elements. -
remove
ThrowsUnsupportedOperationException
.
-