|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectmaiolum.ChapterVerseIdentifier
The ChapterVerseIdentifier class is a container
wrapping identifier for bible verse (typical identifier
is "Mt1:1"). It contains methods to hold
individual verse and chapter components, and to parse
these components from the string.
| Constructor Summary | |
ChapterVerseIdentifier()
Empty constructor, internal ids are set to empty strings, separator defaults to '_' (underscore). |
|
ChapterVerseIdentifier(java.lang.String id)
After calling this constructor, internal chapter and verse ids are parsed from the string argument. |
|
ChapterVerseIdentifier(java.lang.String chapterID,
java.lang.String verseID)
After calling this constructor, internal chapter id is set to chapterID and verse id is set to verseID. |
|
| Method Summary | |
static ChapterVerseIdentifier |
autoParse(java.lang.String id)
Returns new ChapterVerseIdentifier with chapterID and verseID
String parsed from the string argument, while guessing
the separator.
|
java.lang.Object |
clone()
|
java.lang.String |
getChapterID()
|
char |
getSeparator()
|
java.lang.String |
getVerseID()
|
static ChapterVerseIdentifier |
parse(java.lang.String id,
char separator)
Returns new ChapterVerseIdentifier with chapterID and verseID
properties parsed from the string argument.
|
void |
setChapterID(java.lang.String chapterID)
|
void |
setSeparator(char separator)
|
void |
setVerseID(java.lang.String verseID)
|
java.lang.String |
toString()
Returns String representation form ChapterVerseIdentifier
object. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ChapterVerseIdentifier()
public ChapterVerseIdentifier(java.lang.String chapterID,
java.lang.String verseID)
chapterID and verse id is set to verseID.
public ChapterVerseIdentifier(java.lang.String id)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException - if string argument does not
contain separator.| Method Detail |
public static ChapterVerseIdentifier parse(java.lang.String id,
char separator)
throws java.lang.IllegalArgumentException
ChapterVerseIdentifier with chapterID and verseID
properties parsed from the string argument.
Second char argument is separator -- it is a character that separates
chapter id from verse id, for example ':' in
"Mt1:1" string.
ChapterVerseIdentifier with properties
parsed from the string argument
java.lang.IllegalArgumentException - if string argument doesn't contain
separator character.
public static ChapterVerseIdentifier autoParse(java.lang.String id)
throws java.lang.IllegalArgumentException
ChapterVerseIdentifier with chapterID and verseID
String parsed from the string argument, while guessing
the separator.
The separators taken in account while guessing are: semicolon, underscore,
and comma
ChapterVerseIdentifier with chapter and verse
ID automatically parsed from string argument
java.lang.IllegalArgumentException - if string argument doesn't seem
to be valid Chapter identifier (because it does not contain separator
and it is too long);
public void setSeparator(char separator)
public char getSeparator()
public java.lang.String getChapterID()
public void setChapterID(java.lang.String chapterID)
public java.lang.String getVerseID()
public void setVerseID(java.lang.String verseID)
public java.lang.String toString()
ChapterVerseIdentifier
object. This is given as concatenation of chapter id, separator and
verse id. For example: "Mt1:1", where ':' is separator.
public java.lang.Object clone()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||