Package de.xima.fc.utils
Class DefaultedZonedDateTimeTemporalQuery
java.lang.Object
de.xima.fc.utils.DefaultedZonedDateTimeTemporalQuery
- All Implemented Interfaces:
TemporalQuery<ZonedDateTime>
public abstract class DefaultedZonedDateTimeTemporalQuery
extends Object
implements TemporalQuery<ZonedDateTime>
Enumeration of
TemporalQuery
s for a ZonedDateTime
that defaults to a certain value when a
TemporalField
is missing in the TemporalAccessor
.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DefaultedZonedDateTimeTemporalQuery
Defaults to the system time zone, the current date (now), and midnight (00:00 o'clock) when a temporal field is missing. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract LocalDate
getDefaultLocalDate
(Clock clock, ZoneId zone) protected abstract LocalTime
getDefaultLocalTime
(Clock clock, ZoneId zone) protected abstract ZoneId
getDefaultZoneId
(Clock clock) queryFrom
(TemporalAccessor temporal) Returns a new instance with the same behavior defaults as this, but with the given clock used when querying for the current time.
-
Field Details
-
SYSTEM_ZONE_CURRENT_DATE_MIDNIGHT
Defaults to the system time zone, the current date (now), and midnight (00:00 o'clock) when a temporal field is missing.
-
-
Method Details
-
queryFrom
- Specified by:
queryFrom
in interfaceTemporalQuery<ZonedDateTime>
-
withClock
Returns a new instance with the same behavior defaults as this, but with the given clock used when querying for the current time.- Parameters:
clockOverride
- Clock to use.- Returns:
- A new instance with the same behavior defaults as this, but with the given clock used when querying for the current time.
-
getDefaultLocalDate
-
getDefaultLocalTime
-
getDefaultZoneId
-