org.crosswire.jsword.book.sword
Enum BlockType

java.lang.Object
  extended by java.lang.Enum<BlockType>
      extended by org.crosswire.jsword.book.sword.BlockType
All Implemented Interfaces:
Serializable, Comparable<BlockType>

public enum BlockType
extends Enum<BlockType>

Block types indicates the grain of compression.

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
BLOCK_BOOK
          The level of compression is the Book
BLOCK_CHAPTER
          The level of compression is the Book
BLOCK_VERSE
          The level of compression is the Book
 
Field Summary
private  char indicator
          The indicator for the BlockType
private  String name
          The name of the BlockType
 
Method Summary
static BlockType fromString(String name)
          Lookup method to convert from a String
 char getIndicator()
          Return a character indicating the grain of compression.
 String toString()
           
static BlockType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static BlockType[] 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

BLOCK_BOOK

public static final BlockType BLOCK_BOOK
The level of compression is the Book


BLOCK_CHAPTER

public static final BlockType BLOCK_CHAPTER
The level of compression is the Book


BLOCK_VERSE

public static final BlockType BLOCK_VERSE
The level of compression is the Book

Field Detail

name

private String name
The name of the BlockType


indicator

private char indicator
The indicator for the BlockType

Method Detail

values

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

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

valueOf

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

getIndicator

public char getIndicator()
Return a character indicating the grain of compression. This is used in the names of compressed sword books.

Returns:
the indicator

fromString

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


toString

public String toString()
Overrides:
toString in class Enum<BlockType>

Copyright ? 2003-2011