net.sf.plausj.bank.german
Class CheckDigit

java.lang.Object
  extended by net.sf.plausj.bank.german.CheckDigit

public class CheckDigit
extends java.lang.Object

A check digit pointer. The value of the the pos property may have special meanings represented by the MAGICs in this class

Author:
ninan
See Also:
ALWAYS_VALID, ALWAYS_INVALID

Field Summary
static int ALWAYS_INVALID
          If pos has this value, the check digit is always invalid
static int ALWAYS_VALID
          If pos has this value, the check digit is always valid
static int BANK_CODE_NOT_FOUND
          If pos has this value, the bank code was not found
static CheckDigit NO_CHECK
          Symbolic constant meaning there is no check
static int NOT_IMPLEMENTED
          If pos has this value, the check was not implemented
 
Constructor Summary
CheckDigit(int pos, int digit)
          The default CTOR for a check digit
 
Method Summary
 int getDigit()
           
 int getPos()
           
 boolean isAlwaysInvalid()
          Tells you if the check digit is always invalid
 boolean isAlwaysValid()
          Tells you if the check digit is always valid
 boolean isBankCodeNotFound()
          Tells you if the bank code was not found
 boolean isNotImplemented()
          Tells you if the strategy for this bank code was not implemented
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_CHECK

public static final CheckDigit NO_CHECK
Symbolic constant meaning there is no check


ALWAYS_VALID

public static final int ALWAYS_VALID
If pos has this value, the check digit is always valid

See Also:
Constant Field Values

ALWAYS_INVALID

public static final int ALWAYS_INVALID
If pos has this value, the check digit is always invalid

See Also:
Constant Field Values

BANK_CODE_NOT_FOUND

public static final int BANK_CODE_NOT_FOUND
If pos has this value, the bank code was not found

See Also:
Constant Field Values

NOT_IMPLEMENTED

public static final int NOT_IMPLEMENTED
If pos has this value, the check was not implemented

See Also:
Constant Field Values
Constructor Detail

CheckDigit

public CheckDigit(int pos,
                  int digit)
The default CTOR for a check digit

Parameters:
pos - The position of the check digit on the account code. See special meaning.
digit - The check digit calculated by the method.
Method Detail

getDigit

public int getDigit()
Returns:
Returns the digit.

getPos

public int getPos()
Returns:
Returns the pos.

isAlwaysValid

public boolean isAlwaysValid()
Tells you if the check digit is always valid

Returns:
True if the check digit is always valid, false if you need to check yourself

isAlwaysInvalid

public boolean isAlwaysInvalid()
Tells you if the check digit is always invalid

Returns:
True if the check digit is always invalid, false if you need to check yourself

isBankCodeNotFound

public boolean isBankCodeNotFound()
Tells you if the bank code was not found

Returns:
True if the bank code was not found, false if it was

isNotImplemented

public boolean isNotImplemented()
Tells you if the strategy for this bank code was not implemented

Returns:
True if the strategy is not implemented, false if it exists

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2005-2007 null. All Rights Reserved.