org.crosswire.jsword.passage
Class RangedPassage.VerseIterator
java.lang.Object
org.crosswire.jsword.passage.RangedPassage.VerseIterator
- All Implemented Interfaces:
- Iterator
- Enclosing class:
- RangedPassage
private static final class RangedPassage.VerseIterator
- extends Object
- implements Iterator
This class is here to prevent users of RangedPassage.iterator() from
altering the underlying store and getting us out of sync. Right now there
are no issues with someone else removing a RangedPassage without telling
us, however there may be some day, and I'm not sure that we need the
functionality right now. Also buy using this we get to ensure
synchronization. Everything is final so to save the proxying performace
hit.
Field Summary |
private Iterator |
real
The Iterator that we are proxying to |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
real
private Iterator real
- The Iterator that we are proxying to
RangedPassage.VerseIterator
public RangedPassage.VerseIterator(Iterator it)
- Create a basic iterator that is a proxy for the RangedPassage Passages
iterator, with remove() overridden.
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator
next
public Object next()
throws NoSuchElementException
- Specified by:
next
in interface Iterator
- Throws:
NoSuchElementException
remove
public void remove()
throws UnsupportedOperationException
- Specified by:
remove
in interface Iterator
- Throws:
UnsupportedOperationException