public class Card
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Card.Builder |
Modifier and Type | Field and Description |
---|---|
static int |
BINLEN |
Constructor and Description |
---|
Card(Card.Builder builder) |
Modifier and Type | Method and Description |
---|---|
static Card.Builder |
builder() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getBin()
Returns the traditional 6-digit BIN from the PAN
|
java.lang.String |
getBin(int len)
Returns the first
len digits from the PAN. |
java.lang.String |
getCvv2() |
java.lang.String |
getExp() |
java.lang.String |
getPan() |
java.math.BigInteger |
getPanAsNumber() |
java.lang.String |
getServiceCode() |
Track1 |
getTrack1() |
Track2 |
getTrack2() |
boolean |
hasBothTracks() |
int |
hashCode() |
boolean |
hasTrack1() |
boolean |
hasTrack2() |
boolean |
isExpired(java.util.Date currentDate) |
java.lang.String |
toString() |
public static final int BINLEN
public Card(Card.Builder builder)
public java.lang.String getPan()
public java.math.BigInteger getPanAsNumber()
public java.lang.String getExp()
public java.lang.String getCvv2()
public java.lang.String getServiceCode()
public boolean hasTrack1()
public boolean hasTrack2()
public boolean hasBothTracks()
public java.lang.String getBin()
public java.lang.String getBin(int len)
len
digits from the PAN.
Can be used for the newer 8-digit BINs, or some arbitrary length.len
digits of the PANpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Track1 getTrack1()
public Track2 getTrack2()
public boolean isExpired(java.util.Date currentDate)
public static Card.Builder builder()