| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- public class Paypal implements Payment {
- private long id;
- private String payerName;
- private String email;
-
- public Paypal(){
-
- }
-
- public Paypal(long id, String payerName, String email){
- this.id = id;
- this.payerName = payerName;
- this.email= email;
- }
-
- public long getId() {
- return id;
- }
-
- public String getPayerName() {
- return payerName;
- }
-
- public String getShortDescription() {
- return "Paypal " + getPayerName() + " " + getEmail();
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public void setPayerName(String payerName) {
- this.payerName = payerName;
- }
-
- public String getEmail() {
- return email;
- }
-
- public void setEmail(String email) {
- this.email = email;
- }
-
-
- public int compareTo(Payment o) {
-
- if (this.getShortDescription().compareTo(o.getShortDescription()) > 0) return 1;
-
- else if (this.getShortDescription().compareTo(o.getShortDescription()) < 0)return -1;
-
- else return 0;
-
-
- }
- }
|