Revision 8de80607
Added by Andreas Kohlbecker almost 13 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/TaxonComparator.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
/** |
29 | 29 |
* This class makes available a method to compare two {@link TaxonBase taxa} by |
30 |
* comparing the publication dates of the corresponding {@link eu.etaxonomy.cdm.model.name.TaxonNameBase taxon names}. |
|
30 |
* comparing the publication dates of the corresponding |
|
31 |
* {@link eu.etaxonomy.cdm.model.name.TaxonNameBase taxon names}. |
|
31 | 32 |
* |
32 | 33 |
* @author a.mueller |
33 | 34 |
* @created 11.06.2008 |
... | ... | |
40 | 41 |
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) |
41 | 42 |
*/ |
42 | 43 |
/** |
43 |
* Returns an integer generated by comparing the {@link eu.etaxonomy.cdm.model.name.INomenclaturalReference#getYear() publication years} |
|
44 |
* of both {@link eu.etaxonomy.cdm.model.name.TaxonNameBase taxon names} used in the given {@link TaxonBase taxa}. |
|
44 |
* Returns an integer generated by comparing the |
|
45 |
* {@link eu.etaxonomy.cdm.model.name.INomenclaturalReference#getYear() publication years} |
|
46 |
* of both {@link eu.etaxonomy.cdm.model.name.TaxonNameBase taxon names} |
|
47 |
* used in the given {@link TaxonBase taxa}. |
|
45 | 48 |
* Returns a negative value if the publication year corresponding to the |
46 | 49 |
* first given taxon precedes the publication year corresponding to the |
47 | 50 |
* second given taxon. Returns a positive value if the contrary is true and |
48 |
* 0 if both publication years and the date, when they are created, are identical. In case one of the publication |
|
51 |
* 0 if both publication years and the date, when they are created, are identical. |
|
52 |
* In case one of the publication |
|
49 | 53 |
* years is "null" and the other is not, the "empty" publication year will |
50 | 54 |
* be considered to be always preceded by the "not null" publication year. |
51 | 55 |
* If both publication years are "null" the creation date is used for the comparison |
Also available in: Unified diff
fixing #1925 (CICHORIEAE taxon tree order of taxa and bastards)
and also moving ITaxonNodeComparator into model