|
||||||||||
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 String |
part
The part if any. |
private static Pattern |
STRONGS_PATTERN
The pattern of an acceptable Strong's number. |
private int |
strongsNumber
The Strong's Number. |
private boolean |
valid
|
private static DecimalFormat |
ZERO_PAD
|
Constructor Summary | |
---|---|
StrongsNumber(char language,
short strongsNumber)
Build an immutable Strong's Number. |
|
StrongsNumber(char language,
short strongsNumber,
String part)
Build an immutable Strong's Number. |
|
StrongsNumber(String input)
Build an immutable Strong's Number. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getFullStrongsNumber()
Return the canonical form of a Strong's Number, with the part, if any |
String |
getStrongsNumber()
Return the canonical form of a Strong's Number, without the part. |
int |
hashCode()
|
boolean |
isGreek()
|
boolean |
isHebrew()
|
boolean |
isPart()
|
boolean |
isValid()
Validates the number portion of this StrongsNumber. |
private boolean |
parse(String input)
Do the actual parsing. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private char language
private int strongsNumber
private String part
private boolean valid
private static final Pattern STRONGS_PATTERN
private static final DecimalFormat ZERO_PAD
Constructor Detail |
---|
public StrongsNumber(String input)
input
- a string that needs to be parsed.
BookException
public StrongsNumber(char language, short strongsNumber)
language
- strongsNumber
- public StrongsNumber(char language, short strongsNumber, String part)
language
- strongsNumber
- * @throws BookExceptionMethod Detail |
---|
public String getStrongsNumber()
public String getFullStrongsNumber()
public boolean isGreek()
public boolean isHebrew()
public boolean isPart()
public boolean isValid()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
private boolean parse(String input)
input
-
|
Copyright ? 2003-2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |