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 ofTemporalQuerys for aZonedDateTimethat defaults to a certain value when aTemporalFieldis missing in theTemporalAccessor.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Field Summary
Fields Modifier and Type Field Description static DefaultedZonedDateTimeTemporalQuerySYSTEM_ZONE_CURRENT_DATE_MIDNIGHTDefaults to the system time zone, the current date (now), and midnight (00:00 o'clock) when a temporal field is missing.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract LocalDategetDefaultLocalDate(Clock clock, ZoneId zone)protected abstract LocalTimegetDefaultLocalTime(Clock clock, ZoneId zone)protected abstract ZoneIdgetDefaultZoneId(Clock clock)ZonedDateTimequeryFrom(TemporalAccessor temporal)DefaultedZonedDateTimeTemporalQuerywithClock(Clock clockOverride)Returns a new instance with the same behavior defaults as this, but with the given clock used when querying for the current time.
-
-
-
Field Detail
-
SYSTEM_ZONE_CURRENT_DATE_MIDNIGHT
public static final DefaultedZonedDateTimeTemporalQuery 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 Detail
-
queryFrom
public ZonedDateTime queryFrom(TemporalAccessor temporal)
- Specified by:
queryFromin interfaceTemporalQuery<ZonedDateTime>
-
withClock
public DefaultedZonedDateTimeTemporalQuery withClock(Clock clockOverride)
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.
-
-