| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- package com.zipcoder.payment;
-
- public class CreditCard implements Payment {
-
- private long id;
- private String playerName;
- private String number;
- private int expiredMonth;
- private int expiredYear;
-
- public void setId(long id) {
- this.id = id;
- }
-
- public void setPlayerName(String playerName) {
- this.playerName = playerName;
- }
-
- public String getNumber() {
- return number;
- }
-
- public void setNumber(String number) {
- this.number = number;
- }
-
- public int getExpiredMonth() {
- return expiredMonth;
- }
-
- public void setExpiredMonth(int expiredMonth) {
- this.expiredMonth = expiredMonth;
- }
-
- public int getExpiredYear() {
- return expiredYear;
- }
-
- public void setExpiredYear(int expiredYear) {
- this.expiredYear = expiredYear;
- }
-
- public long getId() {
- return id;
- }
-
- public String getPlayerName() {
- return playerName;
- }
-
- public String getShortDescription() {
- return "CC " + playerName + " " + number.substring(number.length() - 4) + " " + expiredMonth + "/" + expiredYear;
- }
-
-
- @Override
- public int compareTo(Payment o) {
- return this.getShortDescription().compareTo(o.getShortDescription());
- }
- }
|