public Interval withEndDateTime ( LocalDateTime dateTime ) { requireNonNull ( dateTime ) ; return new Interval ( startDate , startTime , dateTime . toLocalDate ( ) , dateTime . toLocalTime ( ) ) ; }
Returns a new interval based on this interval but with a different end date and time .