@Test void testSort() { List<Service> services = new ArrayList<>(5); services.add(new DefaultPriority()); services.add(new VeryLowPriority()); services.add(new LowestPriority()); services.add(new HigherPriority()); services.add(new LowerPriority()); Priorities.sort(services, 100); validate(services); }
public static void sort(List<? extends Prioritized> list) { list.sort(Comparator.comparingInt(Prioritized::priority)); }
Priorities { public static void sort(List<? extends Prioritized> list) { list.sort(Comparator.comparingInt(Prioritized::priority)); } }
Priorities { public static void sort(List<? extends Prioritized> list) { list.sort(Comparator.comparingInt(Prioritized::priority)); } private  Priorities(); }
Priorities { public static void sort(List<? extends Prioritized> list) { list.sort(Comparator.comparingInt(Prioritized::priority)); } private  Priorities(); static int find(Class<?> aClass, int defaultPriority); static int find(Object anObject, int defaultPriority); static void sort(List<? extends Prioritized> list); static void sort(List<?> list, int defaultPriority); static Comparator<S> priorityComparator(int defaultPriority); }
Priorities { public static void sort(List<? extends Prioritized> list) { list.sort(Comparator.comparingInt(Prioritized::priority)); } private  Priorities(); static int find(Class<?> aClass, int defaultPriority); static int find(Object anObject, int defaultPriority); static void sort(List<? extends Prioritized> list); static void sort(List<?> list, int defaultPriority); static Comparator<S> priorityComparator(int defaultPriority);  }