/** * iterate, amalgamating Verses into VerseRanges */ protected VerseRangeIterator(Versification v11n, Iterator<Key> it, RestrictionType restrict) { this.v11n = v11n; this.it = it; this.restrict = restrict; if (it.hasNext()) { nextVerse = (Verse) it.next(); } calculateNext(); }
public VerseRange next() throws NoSuchElementException { VerseRange retcode = nextRange; if (retcode == null) { throw new NoSuchElementException(); } calculateNext(); return retcode; }