@Test public final void testNullTaxa() { try { comparator.compare(t1, t2); } catch (Exception e) { fail("No exception expected here"); } }
public final int compare(final Taxon o1, final Taxon o2) { int o = 0; if (o1.getScientificName() == null) { if (o1.getScientificName() != o2.getScientificName()) { return 1; } else { return 0; } } else if (o2.getScientificName() == null) { return -1; } else { o = o1.getScientificName().compareTo(o2.getScientificName()); } if (o == 0) { if (o1.getScientificNameAuthorship() == null) { if (o1.getScientificNameAuthorship() != o2.getScientificNameAuthorship()) { return 1; } else { return 0; } } else if (o2.getScientificNameAuthorship() == null) { return -1; } else { return o1.getScientificNameAuthorship().compareTo(o2.getScientificNameAuthorship()); } } else { return o; } }
AlphabeticalTaxonComparator implements Comparator<Taxon> { public final int compare(final Taxon o1, final Taxon o2) { int o = 0; if (o1.getScientificName() == null) { if (o1.getScientificName() != o2.getScientificName()) { return 1; } else { return 0; } } else if (o2.getScientificName() == null) { return -1; } else { o = o1.getScientificName().compareTo(o2.getScientificName()); } if (o == 0) { if (o1.getScientificNameAuthorship() == null) { if (o1.getScientificNameAuthorship() != o2.getScientificNameAuthorship()) { return 1; } else { return 0; } } else if (o2.getScientificNameAuthorship() == null) { return -1; } else { return o1.getScientificNameAuthorship().compareTo(o2.getScientificNameAuthorship()); } } else { return o; } } }
AlphabeticalTaxonComparator implements Comparator<Taxon> { public final int compare(final Taxon o1, final Taxon o2) { int o = 0; if (o1.getScientificName() == null) { if (o1.getScientificName() != o2.getScientificName()) { return 1; } else { return 0; } } else if (o2.getScientificName() == null) { return -1; } else { o = o1.getScientificName().compareTo(o2.getScientificName()); } if (o == 0) { if (o1.getScientificNameAuthorship() == null) { if (o1.getScientificNameAuthorship() != o2.getScientificNameAuthorship()) { return 1; } else { return 0; } } else if (o2.getScientificNameAuthorship() == null) { return -1; } else { return o1.getScientificNameAuthorship().compareTo(o2.getScientificNameAuthorship()); } } else { return o; } }  }
AlphabeticalTaxonComparator implements Comparator<Taxon> { public final int compare(final Taxon o1, final Taxon o2) { int o = 0; if (o1.getScientificName() == null) { if (o1.getScientificName() != o2.getScientificName()) { return 1; } else { return 0; } } else if (o2.getScientificName() == null) { return -1; } else { o = o1.getScientificName().compareTo(o2.getScientificName()); } if (o == 0) { if (o1.getScientificNameAuthorship() == null) { if (o1.getScientificNameAuthorship() != o2.getScientificNameAuthorship()) { return 1; } else { return 0; } } else if (o2.getScientificNameAuthorship() == null) { return -1; } else { return o1.getScientificNameAuthorship().compareTo(o2.getScientificNameAuthorship()); } } else { return o; } }  final int compare(final Taxon o1, final Taxon o2); }
AlphabeticalTaxonComparator implements Comparator<Taxon> { public final int compare(final Taxon o1, final Taxon o2) { int o = 0; if (o1.getScientificName() == null) { if (o1.getScientificName() != o2.getScientificName()) { return 1; } else { return 0; } } else if (o2.getScientificName() == null) { return -1; } else { o = o1.getScientificName().compareTo(o2.getScientificName()); } if (o == 0) { if (o1.getScientificNameAuthorship() == null) { if (o1.getScientificNameAuthorship() != o2.getScientificNameAuthorship()) { return 1; } else { return 0; } } else if (o2.getScientificNameAuthorship() == null) { return -1; } else { return o1.getScientificNameAuthorship().compareTo(o2.getScientificNameAuthorship()); } } else { return o; } }  final int compare(final Taxon o1, final Taxon o2);  }