-
Where there is a will there is a way.
java 복잡한 Comparator 예제
comparator 를 사용할때 가끔은 복잡한 정렬이 필요할 때가 있다.. 항상 쓸때마다 헷갈림으로 남겨놓습니다.. @Test public void test() { List test = Lists.newArrayList(9, 10, 5, 4, 6, 7, 7, 8, 8, 9); Comparator sortList = Comparator.comparingInt(o -> o); Collections.sort(test, sortList); System.out.println(test); } @Test public void test_복잡한정렬조건() { List areaSortTests = new ArrayList(); areaSortTests.add(new AreaSortTest(0, 10, LocalDateTi..
2019. 12. 19.