org.crosswire.jsword.passage

## Class AbstractPassage.VerseRangeIterator

- java.lang.Object
- - org.crosswire.jsword.passage.AbstractPassage.VerseRangeIterator

- All Implemented Interfaces:
    Iterator<VerseRange>
  Enclosing class:
    AbstractPassage

      protected static final class AbstractPassage.VerseRangeIterator
      extends Object
      implements Iterator<VerseRange>

  Skip over verses that are part of a range

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private Iterator<Key>` | `it` The Iterator that we are proxying to
    `private VerseRange` | `nextRange` What is the next VerseRange to be considered
    `private Verse` | `nextVerse` What is the next Verse to be considered
    `private RestrictionType` | `restrict` Do we restrict ranges to not crossing chapter boundaries
    `private Versification` | `v11n` The Versification to which these verses belong.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractPassage.VerseRangeIterator(Versification v11n, Iterator<Key> it, RestrictionType restrict)` iterate, amalgamating Verses into VerseRanges

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `calculateNext()` Find the next VerseRange
    `boolean` | `hasNext()`
    `VerseRange` | `next()`
    `void` | `remove()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### v11n

          private Versification v11n

      The Versification to which these verses belong.

    - #### it

          private Iterator<Key> it

      The Iterator that we are proxying to

    - #### nextRange

          private VerseRange nextRange

      What is the next VerseRange to be considered

    - #### nextVerse

          private Verse nextVerse

      What is the next Verse to be considered

    - #### restrict

          private RestrictionType restrict

      Do we restrict ranges to not crossing chapter boundaries

  - ### Constructor Detail

    - #### AbstractPassage.VerseRangeIterator

          protected AbstractPassage.VerseRangeIterator(Versification v11n,
                                            Iterator<Key> it,
                                            RestrictionType restrict)

      iterate, amalgamating Verses into VerseRanges

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator<VerseRange>`

    - #### next

          public VerseRange next()
                          throws NoSuchElementException

      Specified by:
        `next` in interface `Iterator<VerseRange>`
      Throws:
        `NoSuchElementException`

    - #### remove

          public void remove()
                      throws UnsupportedOperationException

      Specified by:
        `remove` in interface `Iterator<VerseRange>`
      Throws:
        `UnsupportedOperationException`

    - #### calculateNext

          private void calculateNext()

      Find the next VerseRange