public class HomotypicGroupTaxonComparator extends TaxonComparator
Constructor and Description |
---|
HomotypicGroupTaxonComparator(TaxonBase firstTaxonInGroup) |
HomotypicGroupTaxonComparator(TaxonBase firstTaxonInGroup,
boolean includeRanks) |
Modifier and Type | Method and Description |
---|---|
int |
compare(TaxonBase taxonBase1,
TaxonBase taxonBase2)
Returns an integer generated by comparing first the nomenclatural status and then the
publication years
of both taxon names
used in the given taxa . |
compare, compareNomIlleg, compareStatus
public HomotypicGroupTaxonComparator(TaxonBase firstTaxonInGroup)
firstNameInGroup
- public HomotypicGroupTaxonComparator(TaxonBase firstTaxonInGroup, boolean includeRanks)
firstNameInGroup
- public int compare(TaxonBase taxonBase1, TaxonBase taxonBase2)
TaxonComparator
publication years
of both taxon names
used in the given taxa
.
If 1 name has status of type nom. inval. or nom. nudum the name is put to the end of a
list (returns +1 for a status in taxon1 and -1 for a status in taxon2). If both do have
no status or the same status, the publication date is taken for comparison.
Nom. nudum is handled as more "severe" status then nom.inval.
Returns a negative value if the publication year corresponding to the
first given taxon precedes the publication year corresponding to the
second given taxon. Returns a positive value if the contrary is true and
0 if both publication years and the date, when they are created, are identical.
In case one of the publication
years is "null" and the other is not, the "empty" publication year will
be considered to be always preceded by the "not null" publication year.
If both publication years are "null" the creation date is used for the comparisoncompare
in interface java.util.Comparator<TaxonBase>
compare
in class TaxonComparator
TaxonComparator.compare(TaxonBase, TaxonBase)
,
String.compareTo(String)
,
Comparator.compare(java.lang.Object, java.lang.Object)
Copyright © 2007-2020 EDIT. All Rights Reserved.