Package org.salespointframework.payment
Class Cheque
- java.lang.Object
-
- org.salespointframework.payment.PaymentMethod
-
- org.salespointframework.payment.Cheque
-
- All Implemented Interfaces:
Serializable
public final class Cheque extends PaymentMethod
A is a written bill of exchange (or draft), a written order by the drawer (the writer of the cheque) to the drawee (usually the bank), to pay a specified amount of money to a payee. The classChequerepresents such a written order of payment in a digital form.- Author:
- Hannes Weisbach, Oliver Gierke
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)StringgetAccountName()Name of the account holder.StringgetAccountNumber()Number of the account on which the cheque is drawn.StringgetBankAddress()Address of the bank, that issued the cheque.StringgetBankIdentificationNumber()Unique identification number of this bank.StringgetBankName()Name of the bank, that issued the cheque.StringgetChequeNumber()Number uniquely identifying this cheque.LocalDateTimegetDateWritten()Date on which the cheque was written.StringgetPayee()Name of the payee.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
Cheque
public Cheque(String accountName, String accountNumber, String chequeNumber, String payee, LocalDateTime dateWritten, String bankName, String bankAddress, String bankIdentificationNumber)
Instantiate a newChequeinstance.- Parameters:
accountName- Name of the account holder.accountNumber- Number of this account on which the cheque is drawn.chequeNumber- Number of this cheque. This is a number uniquely identifying a cheque.payee- Name of the party which receives the cheque.dateWritten-DateTimeobject representing the date on which the cheque was written,bankName- Name of the bank that issued the cheque,bankAddress- Address of the bank that issued the cheque.bankIdentificationNumber- Unique identifier of the bank that issued the cheque. Also known as the bank routing number.
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toStringin classPaymentMethod
-
getAccountName
public String getAccountName()
Name of the account holder.
-
getAccountNumber
public String getAccountNumber()
Number of the account on which the cheque is drawn.
-
getChequeNumber
public String getChequeNumber()
Number uniquely identifying this cheque.
-
getPayee
public String getPayee()
Name of the payee.
-
getDateWritten
public LocalDateTime getDateWritten()
Date on which the cheque was written.
-
getBankName
public String getBankName()
Name of the bank, that issued the cheque.
-
getBankAddress
public String getBankAddress()
Address of the bank, that issued the cheque.
-
getBankIdentificationNumber
public String getBankIdentificationNumber()
Unique identification number of this bank. Also known as routing number.
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classPaymentMethod
-
canEqual
protected boolean canEqual(Object other)
- Overrides:
canEqualin classPaymentMethod
-
hashCode
public int hashCode()
- Overrides:
hashCodein classPaymentMethod
-
-