org.crosswire.jsword.passage

## Class PassageTally.OrderedVerseIterator

- java.lang.Object
- - org.crosswire.jsword.passage.PassageTally.OrderedVerseIterator

- All Implemented Interfaces:
    Iterator<Key>
  Enclosing class:
    PassageTally

      private static final class PassageTally.OrderedVerseIterator
      extends Object
      implements Iterator<Key>

  Iterate over the Verses in order of their rank in the tally
  Author:
    Joe Walker

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private Iterator<PassageTally.TalliedVerse>` | `it` The Iterator we are converting
    `private PassageTally.TalliedVerse` | `last` So that we can get at the ranking of the given verse
    `private Versification` | `referenceSystem` The Versification is needed to decode board positions.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `PassageTally.OrderedVerseIterator(Versification v11n, int[] board)` Find the first unused verse

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()`
    `int` | `lastRank()`
    `Key` | `next()`
    `void` | `remove()`

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

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

- - ### Field Detail

    - #### referenceSystem

          private Versification referenceSystem

      The Versification is needed to decode board positions.

    - #### last

          private PassageTally.TalliedVerse last

      So that we can get at the ranking of the given verse

    - #### it

          private Iterator<PassageTally.TalliedVerse> it

      The Iterator we are converting

  - ### Constructor Detail

    - #### PassageTally.OrderedVerseIterator

          protected PassageTally.OrderedVerseIterator(Versification v11n,
                                           int[] board)

      Find the first unused verse

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

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

    - #### next

          public Key next()
                   throws NoSuchElementException

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

    - #### remove

          public void remove()
                      throws UnsupportedOperationException

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

    - #### lastRank

          public int lastRank()
                       throws NoSuchElementException

      Returns:
        the next Verse in the iteration
      Throws:
        `NoSuchElementException` - if hasNext() == false