| 123456789101112131415161718192021222324252627282930 |
- package com.zipcoder.payment;
-
- public class PayPal implements Payment{
- long id;
- String payerName;
- String payerEmail;
-
- public PayPal(long id, String payerName, String payerEmail) {
- this.id = id;
- this.payerName = payerName;
- this.payerEmail = payerEmail;
- }
-
- public long getId(){
- return id;
- }
- public String getPayerName(){
- return payerName;
- }
- public String getPayerEmail() {
- return payerEmail;
- }
- public String getShortDescription(){
- return String.format("Paypal %s %s", payerName, payerEmail);
- }
- public int compareTo(Payment p) {
- return this.getShortDescription().compareTo(p.getShortDescription());
- }
- }
|