|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.book.CaseType
public abstract class CaseType
Types of Sentence Case.
Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors. |
Licence
,
Serialized FormField Summary | |
---|---|
static CaseType |
LOWER
|
static CaseType |
MIXED
|
private String |
name
The name of the type |
private static int |
nextObj
|
private int |
obj
|
static CaseType |
SENTENCE
|
static CaseType |
UPPER
|
private static CaseType[] |
VALUES
|
Constructor Summary | |
---|---|
CaseType(String name)
Simple ctor |
Method Summary | |
---|---|
boolean |
equals(Object o)
Prevent subclasses from overriding canonical identity based Object methods |
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?. |
int |
hashCode()
Prevent subclasses from overriding canonical identity based Object methods |
(package private) Object |
readResolve()
|
abstract String |
setCase(String word)
|
int |
toInteger()
Get an integer representation for this RestrictionType |
protected static String |
toSentenceCase(String word)
Change to sentence case - ie first character in caps, the rest in lower. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final CaseType LOWER
public static final CaseType SENTENCE
public static final CaseType UPPER
public static final CaseType MIXED
private String name
private static int nextObj
private final int obj
private static final CaseType[] VALUES
Constructor Detail |
---|
public CaseType(String name)
Method Detail |
---|
public abstract String setCase(String word)
protected 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)
public final boolean equals(Object o)
equals
in class Object
Object.equals(java.lang.Object)
public final int hashCode()
hashCode
in class Object
Object.hashCode()
public String toString()
toString
in class Object
Object readResolve()
|
Copyright ? 2003-2004 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |