|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.book.study.StrongsNumber
public class StrongsNumber
A Strong's Number is either Greek or Hebrew, where the actual numbers for each start at 1. This class can parse Strong's Numbers that begin with G, g, H or h and are immediately followed by a number. That number can have leading 0's. It can be followed by an OSISref extension of !a, !b, which is ignored.
The canonical representation of the number is a G or H followed by 4 digits, with leading 0's as needed.
Numbers that exist:
for license details.
The copyright to this program is held by it's authors.
Field Summary | |
---|---|
private char |
language
Whether it is Greek (G) or Hebrew (H). |
private static Pattern |
STRONGS_PATTERN
The pattern of an acceptable strongs number. |
private short |
strongsNumber
The Strong's Number. |
private static DecimalFormat |
ZERO_PAD
|
Constructor Summary | |
---|---|
StrongsNumber(char language,
short strongsNumber)
Build an immutable Strong's Number. |
|
StrongsNumber(String input)
Build an immutable Strong's Number. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getStrongsNumber()
Return the canonical form of a Strong's Number. |
int |
hashCode()
|
private void |
parse(String input)
Do the actual parsing. |
String |
toString()
|
private void |
validate()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private char language
private short strongsNumber
private static final Pattern STRONGS_PATTERN
private static final DecimalFormat ZERO_PAD
Constructor Detail |
---|
public StrongsNumber(String input) throws BookException
input
- a string that needs to be parsed.
BookException
public StrongsNumber(char language, short strongsNumber) throws BookException
language
- strongsNumber
-
BookException
Method Detail |
---|
public String getStrongsNumber()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
private void parse(String input) throws BookException
input
-
BookException
private void validate() throws BookException
BookException
|
Copyright ยจ 2003-2007 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |