public class BankCard extends Object implements Serializable
| Constructor and Description |
|---|
BankCard()
No bank card.
|
BankCard(PrimaryAccountNumber pan)
Construct a bank card from the constituent parts.
|
BankCard(PrimaryAccountNumber pan,
ExpirationDate expirationDate)
Construct a bank card from the constituent parts.
|
BankCard(PrimaryAccountNumber pan,
ExpirationDate expirationDate,
Name name)
Construct a bank card from the constituent parts.
|
BankCard(PrimaryAccountNumber pan,
ExpirationDate expirationDate,
Name name,
ServiceCode serviceCode)
Construct a bank card from the constituent parts.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
ExpirationDate |
getExpirationDate()
Gets the card expiration date.
|
Name |
getName()
Gets the cardholder's name.
|
PrimaryAccountNumber |
getPrimaryAccountNumber()
Gets the primary account number for the card.
|
ServiceCode |
getServiceCode()
Gets the service code.
|
boolean |
hasExpirationDate()
Checks whether the card expiration date is available.
|
int |
hashCode() |
boolean |
hasName()
Checks whether the cardholder's name is available.
|
boolean |
hasPrimaryAccountNumber()
Checks whether the primary account number for the card is
available.
|
boolean |
hasServiceCode()
Checks whether the card service code is available.
|
String |
toString() |
public BankCard()
public BankCard(PrimaryAccountNumber pan)
pan - Primary account numberpublic BankCard(PrimaryAccountNumber pan, ExpirationDate expirationDate)
pan - Primary account numberexpirationDate - Card expiration datepublic BankCard(PrimaryAccountNumber pan, ExpirationDate expirationDate, Name name)
pan - Primary account numberexpirationDate - Card expiration datename - Cardholder namepublic BankCard(PrimaryAccountNumber pan, ExpirationDate expirationDate, Name name, ServiceCode serviceCode)
pan - Primary account numberexpirationDate - Card expiration datename - Cardholder nameserviceCode - Service codepublic boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public ExpirationDate getExpirationDate()
public Name getName()
public PrimaryAccountNumber getPrimaryAccountNumber()
public ServiceCode getServiceCode()
public boolean hasExpirationDate()
public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean hasName()
public boolean hasPrimaryAccountNumber()
public boolean hasServiceCode()
public String toString()
toString in class ObjectObject.toString()Copyright © 2014 Sualeh Fatehi. All rights reserved.