Here you can find the source of isAfter(LocalDateTime endDateTime, LocalDateTime startDateTime)
Parameter | Description |
---|---|
endDateTime | a parameter |
startDateTime | a parameter |
public static boolean isAfter(LocalDateTime endDateTime, LocalDateTime startDateTime)
//package com.java2s; //License from project: Apache License import java.time.LocalDateTime; import java.time.LocalTime; public class Main { /**/*from w ww. ja va 2 s. c o m*/ * Checks id the end date time is after start date time * * @param endDateTime * @param startDateTime * @return */ public static boolean isAfter(LocalDateTime endDateTime, LocalDateTime startDateTime) { if (isNotNull(endDateTime) && isNotNull(startDateTime)) { return endDateTime.isAfter(startDateTime); } return false; } public static boolean isAfter(LocalTime endTime, LocalTime startTime) { if (isNotNull(endTime) && isNotNull(startTime)) { return endTime.isAfter(startTime); } return false; } /** * Checks if the specified object is null. * * @param object * @return true if not null otherwise false */ public static boolean isNotNull(Object object) { return object != null; } }