@Test(dataProvider = "comparisonData") public void testCompare(Tuple a, Tuple b, int expected) throws Exception { assertEquals(COMPARATOR.compare(a, b), expected); }
@Override public int compare(T o1, T o2) { for (Comparator<T> comparator : comparators) { int cmp = comparator.compare(o1, o2); if (cmp != 0) { return cmp; } } return 0; }
ChainedComparator implements Comparator<T> { @Override public int compare(T o1, T o2) { for (Comparator<T> comparator : comparators) { int cmp = comparator.compare(o1, o2); if (cmp != 0) { return cmp; } } return 0; } }
ChainedComparator implements Comparator<T> { @Override public int compare(T o1, T o2) { for (Comparator<T> comparator : comparators) { int cmp = comparator.compare(o1, o2); if (cmp != 0) { return cmp; } } return 0; }  }
ChainedComparator implements Comparator<T> { @Override public int compare(T o1, T o2) { for (Comparator<T> comparator : comparators) { int cmp = comparator.compare(o1, o2); if (cmp != 0) { return cmp; } } return 0; }  @Override int compare(T o1, T o2); }
ChainedComparator implements Comparator<T> { @Override public int compare(T o1, T o2) { for (Comparator<T> comparator : comparators) { int cmp = comparator.compare(o1, o2); if (cmp != 0) { return cmp; } } return 0; }  @Override int compare(T o1, T o2);  }