@Test void testCompareDifferentPriorities() { assertTrue(testSubject.compare(new LowPrio(), new HighPrio()) > 0); assertTrue(testSubject.compare(new LowPrio(), new NeutralPrio()) > 0); assertTrue(testSubject.compare(new NeutralPrio(), new HighPrio()) > 0); assertTrue(testSubject.compare(new HighPrio(), new LowPrio()) < 0); assertTrue(testSubject.compare(new NeutralPrio(), new LowPrio()) < 0); assertTrue(testSubject.compare(new HighPrio(), new NeutralPrio()) < 0); }
@Override public int compare(T o1, T o2) { return Integer.compare(getPriority(o2.getClass()), getPriority(o1.getClass())); }
PriorityAnnotationComparator implements Comparator<T> { @Override public int compare(T o1, T o2) { return Integer.compare(getPriority(o2.getClass()), getPriority(o1.getClass())); } }
PriorityAnnotationComparator implements Comparator<T> { @Override public int compare(T o1, T o2) { return Integer.compare(getPriority(o2.getClass()), getPriority(o1.getClass())); } private  PriorityAnnotationComparator(); }
PriorityAnnotationComparator implements Comparator<T> { @Override public int compare(T o1, T o2) { return Integer.compare(getPriority(o2.getClass()), getPriority(o1.getClass())); } private  PriorityAnnotationComparator(); @SuppressWarnings("unchecked") static PriorityAnnotationComparator<T> getInstance(); @Override int compare(T o1, T o2); }
PriorityAnnotationComparator implements Comparator<T> { @Override public int compare(T o1, T o2) { return Integer.compare(getPriority(o2.getClass()), getPriority(o1.getClass())); } private  PriorityAnnotationComparator(); @SuppressWarnings("unchecked") static PriorityAnnotationComparator<T> getInstance(); @Override int compare(T o1, T o2);  }