@Test public void testNextHigherLinneanRank() throws Exception { assertEquals(Rank.FAMILY, RankUtils.nextHigherLinneanRank(Rank.GENUS)); assertEquals(Rank.FAMILY, RankUtils.nextHigherLinneanRank(Rank.SUBFAMILY)); assertEquals(Rank.GENUS, RankUtils.nextHigherLinneanRank(Rank.SUBGENUS)); assertEquals(null, RankUtils.nextHigherLinneanRank(Rank.KINGDOM)); assertEquals(null, RankUtils.nextHigherLinneanRank(Rank.DOMAIN)); assertEquals(Rank.SPECIES, RankUtils.nextHigherLinneanRank(Rank.VARIETY)); }
public static Rank nextHigherLinneanRank(Rank rank) { for (Rank r : LINNEAN_RANKS_REVERSE) { if (r.ordinal() < rank.ordinal()) { return r; } } return null; }
RankUtils { public static Rank nextHigherLinneanRank(Rank rank) { for (Rank r : LINNEAN_RANKS_REVERSE) { if (r.ordinal() < rank.ordinal()) { return r; } } return null; } }
RankUtils { public static Rank nextHigherLinneanRank(Rank rank) { for (Rank r : LINNEAN_RANKS_REVERSE) { if (r.ordinal() < rank.ordinal()) { return r; } } return null; }  }
RankUtils { public static Rank nextHigherLinneanRank(Rank rank) { for (Rank r : LINNEAN_RANKS_REVERSE) { if (r.ordinal() < rank.ordinal()) { return r; } } return null; }  static Rank nextLowerLinneanRank(Rank rank); static Rank nextHigherLinneanRank(Rank rank); static boolean match(Rank r1, Rank r2); }
RankUtils { public static Rank nextHigherLinneanRank(Rank rank) { for (Rank r : LINNEAN_RANKS_REVERSE) { if (r.ordinal() < rank.ordinal()) { return r; } } return null; }  static Rank nextLowerLinneanRank(Rank rank); static Rank nextHigherLinneanRank(Rank rank); static boolean match(Rank r1, Rank r2);  }