org.crosswire.jsword.passage

## Interface VerseKey<T extends VerseKey>

- Type Parameters:
    `T` - The type of VerseKey that reversify returns.
  All Superinterfaces:
    Cloneable, Comparable<Key>, Iterable<Key>, Key, Serializable
  All Known Subinterfaces:
    Passage
  All Known Implementing Classes:
    AbstractPassage, BitwisePassage, DistinctPassage, PassageTally, RangedPassage, ReadOnlyPassage, RocketPassage, SynchronizedPassage, Verse, VerseRange

      public interface VerseKey<T extends VerseKey>
      extends Key

  A VerseKey indicates that a Key has a Versification reference system.
  Author:
    DM Smith
  See Also:
    `The GNU Lesser General Public License for details.`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Versification` | `getVersification()` Get the Versification that defines the Verses in this VerseKey.
    `T` | `getWhole()` Convert this reference into one without a sub-identifier.
    `boolean` | `isWhole()` A VerseKey that does not have an OSIS sub identifier is a whole reference.
    `T` | `reversify(Versification newVersification)` Cast this VerseKey into another Versification.

    - ### Methods inherited from interface org.crosswire.jsword.passage.Key

      `addAll, blur, canHaveChildren, clear, clone, contains, equals, get, getCardinality, getChildCount, getName, getName, getOsisID, getOsisRef, getParent, getRootName, hashCode, indexOf, isEmpty, removeAll, retainAll`

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

    - ### Methods inherited from interface java.lang.Iterable

      `iterator`

- - ### Method Detail

    - #### getVersification

          Versification getVersification()

      Get the Versification that defines the Verses in this VerseKey.
      Returns:
        this VerseKey Versification.

    - #### reversify

          T reversify(Versification newVersification)

      Cast this VerseKey into another Versification. OSIS Sub Identifiers are ignored.

      Note: This is dangerous as it does not consider chapter boundaries or whether the verses in this VerseKey are actually part of the new versification. It should only be used when the start and end verses are in both Versifications. You have been warned.

      Parameters:
        `newVersification` -
      Returns:
        this VerseKey Versification.

    - #### isWhole

          boolean isWhole()

      A VerseKey that does not have an OSIS sub identifier is a whole reference.
      Returns:
        whether this is a whole reference

    - #### getWhole

          T getWhole()

      Convert this reference into one without a sub-identifier. A Verse with an OSIS sub-identifier represents part of a reference.
      Returns:
        a whole reference