Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.jsword.passage
Interface VerseBase

All Superinterfaces:
  Cloneable, Comparable, Key, Serializable

All Known Implementing Classes:
  Verse, VerseRange

    public interface VerseBase

extends Cloneable, Comparable, Serializable, Key

The base unit that is collected by a Passage.

Author:
  Joe Walker [joe at eireneh dot com]
See Also:
  `for license details. The copyright to this program is held by it's authors.`

Method Summary
`String` | `getName()` Translate the Passage into a human readable string
`String` | `getName(Verse base)` Translate the Passage into a human readable string, with the assumption that the specified Verse has just been output, so if we are in the same book, we do not need to display the book name, and so on.
`String` | `getOsisRef()` The OSIS defined specification for this Verse/VerseRange.
`Verse[]` | `toVerseArray()` Create an array of Verses.
`Iterator` | `verseIterator()` Enumerate over the verses in this object.

Methods inherited from interface org.crosswire.jsword.passage.Key
`addAll, blur, canHaveChildren, clear, clone, contains, get, getChildCount, getOsisID, getParent, indexOf, isEmpty, iterator, removeAll, retainAll`

Method Detail

### getName

    String getName()

  Translate the Passage into a human readable string

  Specified by:
    `getName` in interface `Key`
  Returns:
    The string representation

### getName

    String getName(Verse base)

  Translate the Passage into a human readable string, with the assumption that the specified Verse has just been output, so if we are in the same book, we do not need to display the book name, and so on.

  Parameters:
    `base` - The verse to use to cut down unnecessary output.
  Returns:
    The string representation

### getOsisRef

    String getOsisRef()

  The OSIS defined specification for this Verse/VerseRange. Uses short books names, with "." as a verse part separator.

  Specified by:
    `getOsisRef` in interface `Key`
  Returns:
    a String containing the OSIS description of the verses

### toVerseArray

    Verse[] toVerseArray()

  Create an array of Verses. See note on verseElements()

  Returns:
    The array of verses that this makes up
  See Also:
    `verseIterator()`

### verseIterator

    Iterator verseIterator()

  Enumerate over the verses in this object. I remember thinking at some stage that I ought to just use one of toVerseArray() and verseElements() and contemplated removing the other one, but didn't make the change. I suspect the newer (and therefore probably better) implementation is going to be further down the file (i.e. this one), and so toVerseArray should not be used anymore. However I can't remember the reasoning behind it other than the possibility of less Object generation if you are not going to itterate over the whole array.

  Returns:
    A verse iterator

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD