public final class BibleNames extends Object
The GNU Lesser General Public License for details.
Modifier and Type | Class and Description |
---|---|
private class |
BibleNames.NameList
NameList is the internal, internationalize list of names
for a locale.
|
Modifier and Type | Field and Description |
---|---|
private static BibleNames.NameList |
englishBibleNames
English BibleNames, or null when using the program's default locale
|
private static BibleNames |
instance |
private Map<Locale,BibleNames.NameList> |
localizedBibleNames
we cache the Localized Bible Names because there is quite a bit of processing going on for each individual Locale
|
Modifier | Constructor and Description |
---|---|
private |
BibleNames()
This class is a singleton, enforced by a private constructor.
|
Modifier and Type | Method and Description |
---|---|
private static boolean |
containsLetter(String text)
This is simply a convenience function to wrap Character.isLetter()
|
private BibleNames.NameList |
getBibleNamesForLocale(Locale locale)
Gets the bible names for a specific locale.
|
BibleBook |
getBook(String find)
Get a book from its name.
|
BookName |
getBookName(BibleBook book)
Get the BookName.
|
private BibleNames.NameList |
getLocalizedBibleNames()
Gets the localized bible names, based on the
LocaleProviderManager |
String |
getLongName(BibleBook book)
Get the full name of a book (e.g.
|
String |
getPreferredName(BibleBook book)
Get the preferred name of a book.
|
String |
getShortName(BibleBook book)
Get the short name of a book (e.g.
|
static BibleNames |
instance()
Get the singleton instance of BibleNames.
|
boolean |
isBook(String find)
Is the given string a valid book name.
|
(package private) void |
load(Locale locale)
Load name information for BibleNames for a given locale.
|
private transient Map<Locale,BibleNames.NameList> localizedBibleNames
private static BibleNames.NameList englishBibleNames
private static final BibleNames instance
private BibleNames()
public static BibleNames instance()
public BookName getBookName(BibleBook book)
book
- the desired bookpublic String getPreferredName(BibleBook book)
book
- the desired bookpublic String getLongName(BibleBook book)
book
- the bookpublic String getShortName(BibleBook book)
book
- the bookpublic BibleBook getBook(String find)
find
- The string to identifypublic boolean isBook(String find)
find
- The string to identifyvoid load(Locale locale)
locale
- private BibleNames.NameList getLocalizedBibleNames()
LocaleProviderManager
private BibleNames.NameList getBibleNamesForLocale(Locale locale)
locale
- the localeprivate static boolean containsLetter(String text)
text
- The string to be parsed