Revision 9dc896c9
Added by Andreas Müller almost 7 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/lsid/impl/Pattern.java | ||
---|---|---|
1 | 1 |
/** |
2 | 2 |
* Copyright (C) 2009 EDIT |
3 |
* European Distributed Institute of Taxonomy
|
|
3 |
* European Distributed Institute of Taxonomy |
|
4 | 4 |
* http://www.e-taxonomy.eu |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
... | ... | |
18 | 18 |
public static final Pattern NO_LSID_PATTERN = new Pattern(); |
19 | 19 |
public static final String WILDCARD = "*"; |
20 | 20 |
public static final String SEPARATOR = ":"; |
21 |
|
|
22 |
public boolean equals(Object other) { |
|
21 |
|
|
22 |
@Override |
|
23 |
public boolean equals(Object other) { |
|
23 | 24 |
if (this == other) { |
24 | 25 |
return true; |
25 | 26 |
} |
... | ... | |
35 | 36 |
|
36 | 37 |
return true; |
37 | 38 |
} |
38 |
|
|
39 |
public int hashCode() { |
|
39 |
|
|
40 |
@Override |
|
41 |
public int hashCode() { |
|
40 | 42 |
return this.toString().hashCode(); |
41 | 43 |
} |
42 | 44 |
|
43 | 45 |
private String authority; |
44 | 46 |
private String namespace; |
45 | 47 |
|
46 |
public String toString() { |
|
47 |
if (authority == null) |
|
48 |
return "NO_LSID_PATTERN"; |
|
48 |
@Override |
|
49 |
public String toString() { |
|
50 |
if (authority == null) { |
|
51 |
return "NO_LSID_PATTERN"; |
|
52 |
} |
|
49 | 53 |
return authority + Pattern.SEPARATOR + namespace; |
50 | 54 |
} |
51 | 55 |
|
Also available in: Unified diff
fix #6368 rename table and class TaxonNameBase