public class StrongsNumber extends Object
The canonical representation of the number is a G or H followed by 4 digits, with leading 0's as needed.
Numbers that exist:
The GNU Lesser General Public License for details.
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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() |
private char language
private int strongsNumber
private String part
private boolean valid
private static final Pattern STRONGS_PATTERN
private static final DecimalFormat ZERO_PAD
public StrongsNumber(String input)
input
- a string that needs to be parsed.public StrongsNumber(char language, short strongsNumber)
language
- strongsNumber
- public StrongsNumber(char language, short strongsNumber, String part)
language
- strongsNumber
- part
- public String getStrongsNumber()
public String getFullStrongsNumber()
public boolean isGreek()
public boolean isHebrew()
public boolean isPart()
public boolean isValid()
private boolean parse(String input)
input
-