org.crosswire.jsword.versification.system

## Class Versifications

- java.lang.Object
- - org.crosswire.jsword.versification.system.Versifications

-     public final class Versifications
      extends Object

  The Versifications class manages the creation of Versifications as needed. It delays the construction of the Versification until getVersification(String name) is called.
  Author:
    DM Smith
  See Also:
    `The GNU Lesser General Public License for details.`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_V11N` The default Versification for JSword is the KJV.
    `private Map<String,Versification>` | `fluffed` The map of instantiated Versifications, given by their names.
    `private static Versifications` | `instance`
    `private Set<String>` | `known` The set of v11n names.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `private` | `Versifications()` This class is a singleton, enforced by a private constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `private Versification` | `fluff(String name)`
    `Versification` | `getDefaultVersification()` Deprecated. Use `getVersification(String)` instead.
    `Versification` | `getVersification(String name)` Get the Versification by its name.
    `static Versifications` | `instance()` Get the singleton instance of Versifications.
    `boolean` | `isDefined(String name)` Determine whether the named Versification is known.
    `Iterator<String>` | `iterator()` Get an iterator over all known versifications.
    `void` | `register(Versification rs)` Add a Versification that is not predefined by JSword.
    `int` | `size()`

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

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

- - ### Field Detail

    - #### DEFAULT_V11N

          public static final String DEFAULT_V11N

      The default Versification for JSword is the KJV. This is subject to change at any time.
      See Also:
        Constant Field Values

    - #### known

          private Set<String> known

      The set of v11n names.

    - #### fluffed

          private Map<String,Versification> fluffed

      The map of instantiated Versifications, given by their names.

    - #### instance

          private static final Versifications instance

  - ### Constructor Detail

    - #### Versifications

          private Versifications()

      This class is a singleton, enforced by a private constructor.

  - ### Method Detail

    - #### instance

          public static Versifications instance()

      Get the singleton instance of Versifications.
      Returns:
        the singleton

    - #### getDefaultVersification

          @Deprecated
          public Versification getDefaultVersification()

      Deprecated. Use `getVersification(String)` instead.
      Get the default Versification.
      Returns:
        the default Versification.

    - #### getVersification

          public Versification getVersification(String name)

      Get the Versification by its name. If name is null then return the default Versification.
      Parameters:
        `name` - the name of the Versification
      Returns:
        the Versification or null if it is not known.

    - #### isDefined

          public boolean isDefined(String name)

      Determine whether the named Versification is known.
      Parameters:
        `name` - the name of the Versification
      Returns:
        true when the Versification is available for use

    - #### fluff

          private Versification fluff(String name)

    - #### register

          public void register(Versification rs)

      Add a Versification that is not predefined by JSword.
      Parameters:
        `rs` - the Versification to register

    - #### iterator

          public Iterator<String> iterator()

      Get an iterator over all known versifications.
      Returns:
        an iterator of versification names.

    - #### size

          public int size()

      Returns:
        number of versifications