Entry#setInterval(Interval)
| Modifier and Type | Field and Description |
|---|---|
| private static final LocalDate | |
| private static final LocalTime | |
| private static final LocalTime | |
| private static final ZoneId | |
| private final LocalDate | |
| private LocalDateTime | |
| private long | |
| private final LocalTime | |
| private final LocalDate | |
| private LocalDateTime | |
| private long | |
| private final LocalTime | |
| private ZonedDateTime | |
| private ZonedDateTime | |
| private final ZoneId |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | Interval(LocalDateTime
the start date and time (e.g. Oct. 3rd, 2015, 6:15pm) startDateTime, LocalDateTime the end date and time endDateTime)Constructs a new time interval with the given start and end dates / times. |
| public | Interval(ZonedDateTime
the start date and time (e.g. Oct. 3rd, 2015, 6:15pm) zonedStartDateTime, ZonedDateTime the end date and time zonedEndDateTime)Constructs a new time interval with the given start and end zoned dates / times. |
| public | Interval(LocalDateTime
the start date and time (e.g. Oct. 3rd, 2015, 6:15pm) startDateTime, LocalDateTime the end date and time endDateTime, ZoneId the time zone zoneId)Constructs a new time interval with the given start and end dates / times and time zone. |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public Duration | Returns: the duration between the zoned start and end date and timeReturns the duration of this interval. |
| public LocalDate | |
| public LocalDateTime | |
| public long | Returns: the start time in millisecondsReturns the start time in milliseconds since 1.1.1970. |
| public LocalTime | |
| public ZonedDateTime | Returns: the zoned end timeA convenience method to retrieve a zoned date time based on the end date, end time, and time zone id. |
| public LocalDate | |
| public LocalDateTime | Returns: the start local date timeUtility method to get the local start date time. |
| public long | Returns: the start time in millisecondsReturns the start time in milliseconds since 1.1.1970. |
| public LocalTime | |
| public ZonedDateTime | Returns: the zoned start timeA convenience method to retrieve a zoned date time based on the start date, start time, and time zone id. |
| public ZoneId | |
| public int | |
| public String | |
| public Interval | |
| public Interval | Returns: a new intervalthe new start date startDateTime, LocalDateTime the new end date endDateTime)Returns a new interval based on this interval but with a different start and end date. |
| public Interval | Returns: a new intervalthe new duration duration)Returns a new interval based on this interval but with a different duration. |
| public Interval | Returns: a new intervalthe new end date date)Returns a new interval based on this interval but with a different end date. |
| public Interval | Returns: a new intervalthe new end date and time dateTime)Returns a new interval based on this interval but with a different end date and time. |
| public Interval | Returns: a new intervalthe new end time time)Returns a new interval based on this interval but with a different end time. |
| public Interval | Returns: a new intervalthe new start date date)Returns a new interval based on this interval but with a different start date. |
| public Interval | Returns: a new intervalthe new start date and time dateTime)Returns a new interval based on this interval but with a different start date and time. |
| public Interval | Returns: a new intervalthe new start time time)Returns a new interval based on this interval but with a different start time. |
| public Interval | |
| public Interval | Returns: a new intervalthe new time zone zone)Returns a new interval based on this interval but with a different time zone id. |
| defaultDate | back to summary |
|---|---|
| private static final LocalDate defaultDate | |
| defaultEndTime | back to summary |
|---|---|
| private static final LocalTime defaultEndTime | |
| defaultStartTime | back to summary |
|---|---|
| private static final LocalTime defaultStartTime | |
| defaultZoneId | back to summary |
|---|---|
| private static final ZoneId defaultZoneId | |
| endDate | back to summary |
|---|---|
| private final LocalDate endDate | |
| endDateTime | back to summary |
|---|---|
| private LocalDateTime endDateTime | |
| endMillis | back to summary |
|---|---|
| private long endMillis | |
| endTime | back to summary |
|---|---|
| private final LocalTime endTime | |
| startDate | back to summary |
|---|---|
| private final LocalDate startDate | |
| startDateTime | back to summary |
|---|---|
| private LocalDateTime startDateTime | |
| startMillis | back to summary |
|---|---|
| private long startMillis | |
| startTime | back to summary |
|---|---|
| private final LocalTime startTime | |
| zonedEndDateTime | back to summary |
|---|---|
| private ZonedDateTime zonedEndDateTime | |
| zonedStartDateTime | back to summary |
|---|---|
| private ZonedDateTime zonedStartDateTime | |
| zoneId | back to summary |
|---|---|
| private final ZoneId zoneId | |
| Interval | back to summary |
|---|---|
| public Interval() Constructs a new time interval with start and end dates equal to
| |
| Interval | back to summary |
|---|---|
| public Interval(LocalDate startDate, LocalTime startTime, LocalDate endDate, LocalTime endTime) Constructs a new time interval with the given start and end dates /
times. The time zone will be initialized with
| |
| Interval | back to summary |
|---|---|
| public Interval(LocalDateTime startDateTime, LocalDateTime endDateTime) Constructs a new time interval with the given start and end dates /
times. The time zone will be initialized with
| |
| Interval | back to summary |
|---|---|
| public Interval(ZonedDateTime zonedStartDateTime, ZonedDateTime zonedEndDateTime) Constructs a new time interval with the given start and end zoned dates / times. The time zone will be initialized with the time zone of the start date time. However, if the zone ID of the second argument is different then an exception will be thrown.
| |
| Interval | back to summary |
|---|---|
| public Interval(LocalDateTime startDateTime, LocalDateTime endDateTime, ZoneId zoneId) Constructs a new time interval with the given start and end dates / times and time zone.
| |
| Interval | back to summary |
|---|---|
| public Interval(Instant startTime, Instant endTime, ZoneId zoneId) Constructs a new time interval with the given start and end times and time zone. | |
| Interval | back to summary |
|---|---|
| public Interval(LocalDate startDate, LocalTime startTime, LocalDate endDate, LocalTime endTime, ZoneId zoneId) Constructs a new time interval with the given start and end dates / times and time zone. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getDuration | back to summary |
|---|---|
| public Duration getDuration() Returns the duration of this interval.
| |
| getEndDate | back to summary |
|---|---|
| public LocalDate getEndDate() Returns the end date of the interval.
| |
| getEndDateTime | back to summary |
|---|---|
| public LocalDateTime getEndDateTime() Utility method to get the local end date time. This method combines the end date and the end time to create a date time object.
| |
| getEndMillis | back to summary |
|---|---|
| public long getEndMillis() Returns the start time in milliseconds since 1.1.1970.
| |
| getEndTime | back to summary |
|---|---|
| public LocalTime getEndTime() Returns the end time of the interval.
| |
| getEndZonedDateTime | back to summary |
|---|---|
| public ZonedDateTime getEndZonedDateTime() A convenience method to retrieve a zoned date time based on the end date, end time, and time zone id.
| |
| getStartDate | back to summary |
|---|---|
| public LocalDate getStartDate() Returns the start date of the interval.
| |
| getStartDateTime | back to summary |
|---|---|
| public LocalDateTime getStartDateTime() Utility method to get the local start date time. This method combines the start date and the start time to create a date time object.
| |
| getStartMillis | back to summary |
|---|---|
| public long getStartMillis() Returns the start time in milliseconds since 1.1.1970.
| |
| getStartTime | back to summary |
|---|---|
| public LocalTime getStartTime() Returns the start time of the interval.
| |
| getStartZonedDateTime | back to summary |
|---|---|
| public ZonedDateTime getStartZonedDateTime() A convenience method to retrieve a zoned date time based on the start date, start time, and time zone id.
| |
| getZoneId | back to summary |
|---|---|
| public ZoneId getZoneId() Returns the time zone ID.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| withDates | back to summary |
|---|---|
| public Interval withDates(LocalDate startDate, LocalDate endDate) Returns a new interval based on this interval but with a different start and end date. | |
| withDates | back to summary |
|---|---|
| public Interval withDates(LocalDateTime startDateTime, LocalDateTime endDateTime) Returns a new interval based on this interval but with a different start and end date.
| |
| withDuration | back to summary |
|---|---|
| public Interval withDuration(Duration duration) Returns a new interval based on this interval but with a different duration. The duration will change the end time and / or the end date. | |
| withEndDate | back to summary |
|---|---|
| public Interval withEndDate(LocalDate date) Returns a new interval based on this interval but with a different end date. | |
| withEndDateTime | back to summary |
|---|---|
| public Interval withEndDateTime(LocalDateTime dateTime) Returns a new interval based on this interval but with a different end date and time.
| |
| withEndTime | back to summary |
|---|---|
| public Interval withEndTime(LocalTime time) Returns a new interval based on this interval but with a different end time. | |
| withStartDate | back to summary |
|---|---|
| public Interval withStartDate(LocalDate date) Returns a new interval based on this interval but with a different start date. | |
| withStartDateTime | back to summary |
|---|---|
| public Interval withStartDateTime(LocalDateTime dateTime) Returns a new interval based on this interval but with a different start date and time.
| |
| withStartTime | back to summary |
|---|---|
| public Interval withStartTime(LocalTime time) Returns a new interval based on this interval but with a different start time. | |
| withTimes | back to summary |
|---|---|
| public Interval withTimes(LocalTime startTime, LocalTime endTime) Returns a new interval based on this interval but with a different start and end time. | |
| withZoneId | back to summary |
|---|---|
| public Interval withZoneId(ZoneId zone) Returns a new interval based on this interval but with a different time zone id. | |