1 | public class Email {↵ | | 1 | public class Permission {↵
|
2 | private String address;↵ | | 2 | private String ↵
|
3 | Email↵ | | 3 | type;↵
|
4 | () {}↵ | | 4 | Permission() {}↵
|
5 | public String getAddress() {↵ | | 5 | public String getType() {↵
|
6 | return address;↵ | | 6 | return type;↵
|
7 | }↵ | | 7 | }↵
|
8 | public void setAddress(String type) {↵ | | 8 | public void setType(String type) {↵
|
9 | this.address = type;↵ | | 9 | this.type = type;↵
|
10 | }↵ | | 10 | }↵
|
11 | public Email(String type) {↵ | | 11 | public Permission(String type) {↵
|
12 | this.address = type;↵ | | 12 | this.type = type;↵
|
13 | }↵ | | 13 | }↵
|
14 | public boolean equals(Object that) {↵ | | 14 | public boolean equals(Object that) {↵
|
15 | if ( !(that instanceof Email) ) return false;↵ | | 15 | if ( !(that instanceof Permission) ) return false;↵
|
16 | Email p = (Email) that;↵ | | 16 | Permission p = (Permission) that;↵
|
17 | return this.address.equals(p.address);↵ | | 17 | return this.type.equals(p.type);↵
|
18 | }↵ | | 18 | }↵
|
19 | public int hashCode() {↵ | | 19 | public int hashCode() {↵
|
20 | return address.hashCode();↵ | | 20 | return type.hashCode();↵
|
21 | | | 21 |
|