jPOS 1.6.7 API Documentation

org.jpos.core
Class CardSelector

java.lang.Object
  extended by org.jpos.core.CardSelector

public class CardSelector
extends java.lang.Object

Since:
jPOS 1.1 helper class maps BIN (Bank Issuer Number) to CardNames
We use a custom not-so-singleton pattern here. Although getDefault() returns a unique instance of CardSelector we have the chance to use multiple instances of CardSelector within the same JVM if ever needed.
Version:
$Id: CardSelector.java 2854 2010-01-02 10:34:31Z apr $
Author:
apr@cs.com.uy

Nested Class Summary
 class CardSelector.Entry
           
 
Constructor Summary
CardSelector()
           
CardSelector(java.util.List list)
           
 
Method Summary
 void add(CardBrand card, int bin)
           
 void add(CardBrand card, int low, int high)
           
 CardBrand getCardBrand(java.lang.String bin)
           
static CardSelector getDefault()
           
 void remove(CardBrand card)
           
static void setDefault(CardSelector def)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CardSelector

public CardSelector()

CardSelector

public CardSelector(java.util.List list)
Method Detail

add

public void add(CardBrand card,
                int low,
                int high)
Parameters:
card - CardBrand
low - BIN
high - BIN

add

public void add(CardBrand card,
                int bin)
Parameters:
card - CardBrand
bin -

setDefault

public static void setDefault(CardSelector def)

getDefault

public static CardSelector getDefault()

getCardBrand

public CardBrand getCardBrand(java.lang.String bin)
                       throws UnknownCardException
Throws:
UnknownCardException

remove

public void remove(CardBrand card)

jPOS.org