1 | public boolean equals(Object another) {↵ | | 1 | public synchronized boolean equals(Object another) {↵
|
2 | if (this == another) {↵ | | 2 | if (this == another) {↵
|
3 | return true;↵ | | 3 | return true;↵
|
4 | }↵ | | 4 | }↵
|
5 | if (isReference()) {↵ | | 5 | if (isReference()) {↵
|
6 | return getCheckedRef().equals(another);↵ | | 6 | return getCheckedRef().equals(another);↵
|
7 | }↵ | | 7 | }↵
|
8 | if (!(another.getClass().equals(getClass()))) {↵ | | 8 | if (!(another.getClass().equals(getClass()))) {↵
|
9 | return false;↵ | | 9 | return false;↵
|
10 | }↵ | | 10 | }↵
|
11 | FileResource otherfr = (FileResource) another;↵ | | 11 | URLResource otheru = (URLResource) another;↵
|
12 | return getFile() == null↵ | | 12 | return getURL() == null↵
|
13 | ? otherfr.getFile() == null↵ | | 13 | ? otheru.getURL() == null↵
|
14 | : getFile().equals(otherfr.getFile());↵ | | 14 | : getURL().equals(otheru.getURL());↵
|
15 | | | 15 |
|