@Test public void byUrgencyComparesInAscendingOrder() { testComparator(byUrgency(), makeTask(13.231f), makeTask(3.12f)); }
public static Comparator<Task> byUrgency() { return new Comparator<Task>() { @Override public int compare(Task lhs, Task rhs) { return Float.compare(lhs.urgency, rhs.urgency); } }; }
TaskComparators { public static Comparator<Task> byUrgency() { return new Comparator<Task>() { @Override public int compare(Task lhs, Task rhs) { return Float.compare(lhs.urgency, rhs.urgency); } }; } }
TaskComparators { public static Comparator<Task> byUrgency() { return new Comparator<Task>() { @Override public int compare(Task lhs, Task rhs) { return Float.compare(lhs.urgency, rhs.urgency); } }; } private  TaskComparators(); }
TaskComparators { public static Comparator<Task> byUrgency() { return new Comparator<Task>() { @Override public int compare(Task lhs, Task rhs) { return Float.compare(lhs.urgency, rhs.urgency); } }; } private  TaskComparators(); static Comparator<Task> byUrgency(); static Comparator<T> reverse(final Comparator<T> comparator); }
TaskComparators { public static Comparator<Task> byUrgency() { return new Comparator<Task>() { @Override public int compare(Task lhs, Task rhs) { return Float.compare(lhs.urgency, rhs.urgency); } }; } private  TaskComparators(); static Comparator<Task> byUrgency(); static Comparator<T> reverse(final Comparator<T> comparator);  }