@Test void testUndefinedConsideredNeutralPriority() { assertTrue(testSubject.compare(new UndefinedPrio(), new HighPrio()) > 0); assertTrue(testSubject.compare(new UndefinedPrio(), new LowPrio()) < 0); assertTrue(testSubject.compare(new UndefinedPrio(), new NeutralPrio()) == 0); assertTrue(testSubject.compare(new HighPrio(), new UndefinedPrio()) < 0); assertTrue(testSubject.compare(new LowPrio(), new UndefinedPrio()) > 0); assertTrue(testSubject.compare(new NeutralPrio(), new UndefinedPrio()) == 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);  }