Line | |
---|
1 | package clarin.cmdi.componentregistry; |
---|
2 | |
---|
3 | /** |
---|
4 | * |
---|
5 | * @author Twan Goosen <twan.goosen@mpi.nl> |
---|
6 | */ |
---|
7 | public class OwnerGroup implements Owner { |
---|
8 | |
---|
9 | private final Number id; |
---|
10 | |
---|
11 | public OwnerGroup(Number id) { |
---|
12 | this.id = id; |
---|
13 | } |
---|
14 | |
---|
15 | @Override |
---|
16 | public Number getId() { |
---|
17 | return id; |
---|
18 | } |
---|
19 | |
---|
20 | @Override |
---|
21 | public boolean equals(Object obj) { |
---|
22 | if (obj == null) { |
---|
23 | return false; |
---|
24 | } |
---|
25 | if (getClass() != obj.getClass()) { |
---|
26 | return false; |
---|
27 | } |
---|
28 | final OwnerGroup other = (OwnerGroup) obj; |
---|
29 | if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) { |
---|
30 | return false; |
---|
31 | } |
---|
32 | return true; |
---|
33 | } |
---|
34 | |
---|
35 | @Override |
---|
36 | public int hashCode() { |
---|
37 | int hash = 3; |
---|
38 | hash = 31 * hash + (this.id != null ? this.id.hashCode() : 0); |
---|
39 | return hash; |
---|
40 | } |
---|
41 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.