org.davesag.generica.util
Class CreditCardUtils.CardType

java.lang.Object
  extended byorg.davesag.generica.util.CreditCardUtils.CardType
All Implemented Interfaces:
Serializable
Enclosing class:
CreditCardUtils

public class CreditCardUtils.CardType
extends Object
implements Serializable

An inner class that holds handy information about each type of credit card.

See Also:
Serialized Form

Field Summary
protected  String theAka
          the alt name
protected  String theName
          the name
protected  int[] thePrefixValues
          the array of prefix values
protected  int theWidth
          the number of digits in the card number
 
Constructor Summary
CreditCardUtils.CardType(String name, String aka, int width, int[] prefixen)
          Constructor that takes a name, aka value, width and array of prefix values.
 
Method Summary
 String getAka()
          Get the alternative name of the card type.
 String getName()
          Get the name of the card type.
 int[] getPrefixValues()
          Get the array of prefix values of the card type.
 int getWidth()
          Get the width of the card type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theName

protected String theName
the name


theAka

protected String theAka
the alt name


theWidth

protected int theWidth
the number of digits in the card number


thePrefixValues

protected int[] thePrefixValues
the array of prefix values

Constructor Detail

CreditCardUtils.CardType

public CreditCardUtils.CardType(String name,
                                String aka,
                                int width,
                                int[] prefixen)
Constructor that takes a name, aka value, width and array of prefix values.

Parameters:
name - The card name.
aka - An alternative card name.
width - The number of digits allowed in the card number.
prefixen - The array of prefix numbers.
Method Detail

getName

public String getName()
Get the name of the card type.

Returns:
CardType's name.

getWidth

public int getWidth()
Get the width of the card type.

Returns:
number of digits allowed in this type of card's number.

getAka

public String getAka()
Get the alternative name of the card type.

Returns:
CardType's other name, or the name if the aka is null.

getPrefixValues

public int[] getPrefixValues()
Get the array of prefix values of the card type.

Returns:
CardType's prefix values.


Dave Sag Generica API version 0.5.9 - (prerelease) Copyright 2003 - 2004 Dave Sag.