View Javadoc
1   package com.puppycrawl.tools.checkstyle.grammars.java8;
2   import java.time.chrono.ChronoLocalDate;
3   import java.time.chrono.ChronoLocalDateTime;
4   import java.util.Comparator;
5   
6   
7   
8   public class InputLambda16 {
9   
10  	static final Comparator<ChronoLocalDateTime<? extends ChronoLocalDate>> DATE_TIME_ORDER =
11           (Comparator<ChronoLocalDateTime<? extends ChronoLocalDate>>) (dateTime1, dateTime2) -> {
12               int cmp = Long.compare(dateTime1.toLocalDate().toEpochDay(), dateTime2.toLocalDate().toEpochDay());
13               if (cmp == 0) {
14                   cmp = Long.compare(dateTime1.toLocalTime().toNanoOfDay(), dateTime2.toLocalTime().toNanoOfDay());
15               }
16               return cmp;
17           };
18  	
19  	public static void main(String args[]) {
20  		
21  	}
22  }