|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<CaseType>
org.crosswire.jsword.book.CaseType
public enum CaseType
Types of Sentence Case.
for license details.
The copyright to this program is held by it's authors.
Enum Constant Summary | |
---|---|
LOWER
|
|
SENTENCE
|
|
UPPER
|
Method Summary | |
---|---|
static CaseType |
fromInteger(int i)
Lookup method to convert from an integer |
static CaseType |
fromString(String name)
Lookup method to convert from a String |
static CaseType |
getCase(String word)
What case is the specified word?. |
abstract String |
setCase(String word)
|
int |
toInteger()
Get an integer representation for this CaseType |
static String |
toSentenceCase(String word)
Change to sentence case - that is first character in caps, the rest in lower. |
static CaseType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static CaseType[] |
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 |
---|
public static final CaseType LOWER
public static final CaseType SENTENCE
public static final CaseType UPPER
Method Detail |
---|
public static CaseType[] values()
for (CaseType c : CaseType.values()) System.out.println(c);
public static CaseType valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic abstract String setCase(String word)
public static String toSentenceCase(String word)
word
- The word to be manipulated
public static CaseType getCase(String word)
The issue here is that getCase("FreD") is undefined. Telling if this is SENTENCE (Tubal-Cain) or MIXED (really the case) is complex and would slow things down for a case that I don't believe happens with Bible text.
word
- The word to be tested
IllegalArgumentException
- is the word is nullpublic int toInteger()
public static CaseType fromString(String name)
public static CaseType fromInteger(int i)
|
Copyright ? 2003-2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |