|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.bacchus.Rtn
public class Rtn
A routing transit number.
| Field Summary | |
|---|---|
static int |
MAX_RTN
The maximum valid RTN. |
| Constructor Summary | |
|---|---|
Rtn()
Creates an RTN with an undefined value. |
|
Rtn(int value)
Creates an RTN with the given value and a computed check digit. |
|
Rtn(int value,
int check)
Creates an RTN with the given value and check digit. |
|
| Method Summary | |
|---|---|
static int |
computeCheckDigit(Integer rtn)
Computes the check digit for a routing transit number. |
int |
getCheck()
Gets the check digit. |
int |
getRtn()
Gets the 8 digit RTN without the check digit, or zero if it is not set. |
void |
normalize()
Normalizes the RTN so it does not contain an unnecessary explicit check digit. |
void |
setCheck(int check)
Sets the check digit. |
void |
setRtn(int rtn)
Sets the 8 digit RTN without the check digit. |
String |
toString()
Formats the full 9 digit RTN. |
void |
validate()
Validates this RTN. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_RTN
| Constructor Detail |
|---|
public Rtn()
public Rtn(int value)
value - the 8 digit RTN without the check digit.
public Rtn(int value,
int check)
value - the 8 digit RTN without the check digit.check - | Method Detail |
|---|
public static int computeCheckDigit(Integer rtn)
null or out of range, returns 0.
rtn - the routing transit number.
public int getRtn()
public void setRtn(int rtn)
rtn - the RTN.getRtn()public int getCheck()
computeCheckDigit(Integer).
public void setCheck(int check)
check - the check digit.getCheck()
public void validate()
throws InvalidRecordException
set and within
the range 1 through MAX_RTN. If the check digit is
set, it must be correct. This method does not
check whether the RTN is actually assigned.
InvalidRecordException - if this RTN is not valid.public void normalize()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||