|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.versification.BookName
public final class BookName
BookName represents the different ways a book of the bible is named.
for license details.
The copyright to this program is held by it's authors.
Field Summary | |
---|---|
private String[] |
alternateNames
|
private int |
bookNumber
|
private Locale |
locale
The locale for the Book Name |
private String |
longName
|
private String |
normalizedLongName
|
private String |
normalizedShortName
|
private static Pattern |
normPattern
remove spaces and some punctuation in Book Name (make sure , is allowed) |
private String |
shortName
|
Constructor Summary | |
---|---|
BookName(Locale locale,
int bookNumber,
String longName,
String shortName,
String alternateNames)
Create a BookName for a Book of the Bible in a given language. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getLongName()
Get the full name of a book (e.g. |
String |
getNormalizedLongName()
|
String |
getNormalizedShortName()
|
int |
getNumber()
Get canonical number of a book. |
String |
getPreferredName()
Get the preferred name of a book. |
String |
getShortName()
Get the short name of a book (e.g. |
int |
hashCode()
|
boolean |
match(String normalizedName)
Match the normalized name as closely as possible. |
static String |
normalize(String str,
Locale locale)
Normalize by stripping punctuation and whitespace and lowercasing. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static Pattern normPattern
private int bookNumber
private String longName
private String normalizedLongName
private String shortName
private String normalizedShortName
private String[] alternateNames
private Locale locale
Constructor Detail |
---|
public BookName(Locale locale, int bookNumber, String longName, String shortName, String alternateNames)
locale
- the language of this BookNamebookNumber
- the Book's canonical numberlongName
- the Book's long nameshortName
- the Book's short name, if anyalternateNames
- optional comma separated list of alternates for the BookMethod Detail |
---|
public int getNumber()
public String getPreferredName()
public String getLongName()
public String getShortName()
public String getNormalizedLongName()
public String getNormalizedShortName()
public boolean match(String normalizedName)
normalizedName
- the already normalized name to match against.
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
public static String normalize(String str, Locale locale)
str
- the string to normalize
|
Copyright ยจ 2003-2007 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |