org.crosswire.jsword.book

## Enum BookCategory

- java.lang.Object
- - java.lang.Enum<BookCategory>
  - - org.crosswire.jsword.book.BookCategory

- All Implemented Interfaces:
    Serializable, Comparable<BookCategory>

      public enum BookCategory
      extends Enum<BookCategory>

  An Enumeration of the possible types of Book.
  Author:
    Joe Walker, DM Smith
  See Also:
    `The GNU Lesser General Public License for details.`

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `BIBLE` Books that are Bibles
    `COMMENTARY` Books that are Commentaries
    `DAILY_DEVOTIONS` Books that are indexed by day.
    `DICTIONARY` Books that are Dictionaries
    `ESSAYS` Books that are just essays.
    `GENERAL_BOOK` Books that are just books.
    `GLOSSARY` Books that map words from one language to another.
    `IMAGES` Books that are predominately images.
    `MAPS` Books that are a collection of maps.
    `OTHER` Books that are not any of the above.
    `QUESTIONABLE` Books that are questionable.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private String` | `externalName`
    `private String` | `name` The names of the BookCategory

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static BookCategory` | `fromExternalString(String name)` Lookup method to convert from a String
    `static BookCategory` | `fromInteger(int i)` Lookup method to convert from an integer
    `static BookCategory` | `fromString(String name)` Lookup method to convert from a String
    `String` | `getName()`
    `String` | `toString()`
    `static BookCategory` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static BookCategory[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### BIBLE

          public static final BookCategory BIBLE

      Books that are Bibles

    - #### DICTIONARY

          public static final BookCategory DICTIONARY

      Books that are Dictionaries

    - #### COMMENTARY

          public static final BookCategory COMMENTARY

      Books that are Commentaries

    - #### DAILY_DEVOTIONS

          public static final BookCategory DAILY_DEVOTIONS

      Books that are indexed by day. AKA, Daily Devotions

    - #### GLOSSARY

          public static final BookCategory GLOSSARY

      Books that map words from one language to another.

    - #### QUESTIONABLE

          public static final BookCategory QUESTIONABLE

      Books that are questionable.

    - #### ESSAYS

          public static final BookCategory ESSAYS

      Books that are just essays.

    - #### IMAGES

          public static final BookCategory IMAGES

      Books that are predominately images.

    - #### MAPS

          public static final BookCategory MAPS

      Books that are a collection of maps.

    - #### GENERAL_BOOK

          public static final BookCategory GENERAL_BOOK

      Books that are just books.

    - #### OTHER

          public static final BookCategory OTHER

      Books that are not any of the above. This is a catch all for new book categories.

  - ### Field Detail

    - #### name

          private transient String name

      The names of the BookCategory

    - #### externalName

          private transient String externalName

  - ### Method Detail

    - #### values

          public static BookCategory[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (BookCategory c : BookCategory.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static BookCategory valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### fromString

          public static BookCategory fromString(String name)

      Lookup method to convert from a String
      Parameters:
        `name` - the internal name of a BookCategory
      Returns:
        the matching BookCategory

    - #### fromExternalString

          public static BookCategory fromExternalString(String name)

      Lookup method to convert from a String
      Parameters:
        `name` - the external name of a BookCategory
      Returns:
        the matching BookCategory

    - #### fromInteger

          public static BookCategory fromInteger(int i)

      Lookup method to convert from an integer
      Parameters:
        `i` - the ordinal value of the BookCategory in this enumeration.
      Returns:
        the i-th BookCategory

    - #### getName

          public String getName()

      Returns:
        the internal name.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Enum<BookCategory>`
      Returns:
        the internationalized name.