org.crosswire.jsword.passage
Enum PassageType

java.lang.Object
  extended by java.lang.Enum<PassageType>
      extended by org.crosswire.jsword.passage.PassageType
All Implemented Interfaces:
Serializable, Comparable<PassageType>

public enum PassageType
extends Enum<PassageType>

Types of Passage optimizations.

Author:
DM Smith
See Also:
for license details.
The copyright to this program is held by it's authors.

Enum Constant Summary
MIX
          Optimize the Passage for a mix
SIZE
          Optimize the Passage for size
SPEED
          Optimize the Passage for speed
TALLY
          Optimize the Passage for tally operations
WRITE_SPEED
          Optimize the Passage for write speed
 
Method Summary
abstract  Passage createEmptyPassage(Versification v11n)
          Create an empty, optimized passage
 Passage createPassage(Versification v11n, String passage)
           
abstract  Passage createPassage(Versification v11n, String passage, Key basis)
          Create an optimized passage
static PassageType fromInteger(int i)
          Lookup method to convert from an integer
static PassageType fromString(String name)
          Lookup method to convert from a String
static int toInteger(PassageType type)
          Lookup method to convert from an integer
static PassageType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PassageType[] 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, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SPEED

public static final PassageType SPEED
Optimize the Passage for speed


WRITE_SPEED

public static final PassageType WRITE_SPEED
Optimize the Passage for write speed


SIZE

public static final PassageType SIZE
Optimize the Passage for size


MIX

public static final PassageType MIX
Optimize the Passage for a mix


TALLY

public static final PassageType TALLY
Optimize the Passage for tally operations

Method Detail

values

public static PassageType[] 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 (PassageType c : PassageType.values())
    System.out.println(c);

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

valueOf

public static PassageType 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

createPassage

public abstract Passage createPassage(Versification v11n,
                                      String passage,
                                      Key basis)
                               throws NoSuchVerseException
Create an optimized passage

Parameters:
passage -
Returns:
the optimized passage
Throws:
NoSuchVerseException

createPassage

public Passage createPassage(Versification v11n,
                             String passage)
                      throws NoSuchVerseException
Throws:
NoSuchVerseException

createEmptyPassage

public abstract Passage createEmptyPassage(Versification v11n)
Create an empty, optimized passage

Returns:
the optimized, empty passage
Throws:
NoSuchVerseException

fromString

public static PassageType fromString(String name)
Lookup method to convert from a String


fromInteger

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


toInteger

public static int toInteger(PassageType type)
Lookup method to convert from an integer


Copyright ? 2003-2011