net.sf.plausj.bank.german
Class AccountCode

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

public class AccountCode
extends java.lang.Object

This is a german bank account code

Author:
ninan

Field Summary
static int ACCOUNT_CODE_MAX_LENGTH
          The maximum length for an account code
static int ACCOUNT_CODE_MIN_LENGTH
          The minimal length for an account code
 
Constructor Summary
AccountCode(java.lang.String accountCode)
          The default-CTOR for the account code object
 
Method Summary
 java.lang.String getAccountCode()
          Returns the account code as padded string
 int[] getAsIntArray()
          Returns an integer array containing the digits of the account code
 long getAsLong()
           
 int getDigitAtPos(int pos)
          Returns the digit of the account code on the specified position
 int getRealLength()
           
 boolean matchesCheckDigit(CheckDigit cd)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACCOUNT_CODE_MIN_LENGTH

public static final int ACCOUNT_CODE_MIN_LENGTH
The minimal length for an account code

See Also:
Constant Field Values

ACCOUNT_CODE_MAX_LENGTH

public static final int ACCOUNT_CODE_MAX_LENGTH
The maximum length for an account code

See Also:
Constant Field Values
Constructor Detail

AccountCode

public AccountCode(java.lang.String accountCode)
            throws java.lang.IllegalArgumentException
The default-CTOR for the account code object

Parameters:
accountCode - The account code this object represents
Throws:
java.lang.IllegalArgumentException - Thrown if the supplied account code is invalid
Method Detail

getAccountCode

public java.lang.String getAccountCode()
Returns the account code as padded string

Returns:
The accountCode.

getAsIntArray

public int[] getAsIntArray()
Returns an integer array containing the digits of the account code

Returns:
An integer array containing the digits of the account code

getAsLong

public long getAsLong()

getDigitAtPos

public int getDigitAtPos(int pos)
Returns the digit of the account code on the specified position

Parameters:
pos - the position to return the digit for
Returns:
The digit that is on the supplied position
Throws:
java.lang.IndexOutOfBoundsException - Thrown if the pos exceeds the range of the accountCode

matchesCheckDigit

public boolean matchesCheckDigit(CheckDigit cd)

getRealLength

public int getRealLength()

toString

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


Copyright © 2005-2007 null. All Rights Reserved.