Package org.jfree.util
Class ReadOnlyIterator
- java.lang.Object
-
- org.jfree.util.ReadOnlyIterator
-
-
Constructor Summary
Constructors Constructor Description ReadOnlyIterator(Iterator it)
Creates a new read-only iterator for the given iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Returns true if the iteration has more elements.Object
next()
Returns the next element in the iteration.void
remove()
ThrowsUnsupportedOperationException
.
-
-
-
Constructor Detail
-
ReadOnlyIterator
public ReadOnlyIterator(Iterator it)
Creates a new read-only iterator for the given iterator.- Parameters:
it
- the iterator.
-
-
Method Detail
-
hasNext
public boolean 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
public Object next()
Returns the next element in the iteration. Throws NoSuchElementException when iteration has no more elements.
-
-