org.crosswire.jsword.book
Enum BookCategory

java.lang.Object
  extended by java.lang.Enum<BookCategory>
      extended by 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 [joe at eireneh dot com], DM Smith
See Also:
for license details.
The copyright to this program is held by it's authors.

Enum Constant Summary
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
private  String externalName
           
private  String name
          The names of the BookCategory
 
Method Summary
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


fromExternalString

public static BookCategory fromExternalString(String name)
Lookup method to convert from a String


fromInteger

public static BookCategory fromInteger(int i)
Lookup method to convert from an integer


getName

public String getName()
Returns:
the internal name.

toString

public String toString()
Overrides:
toString in class Enum<BookCategory>
Returns:
the internationalized name.

Copyright ? 2003-2011