Package com.illumon.iris.db.v2.sources
Interface ConvertableTimeSource
- All Known Implementing Classes:
DateTimeArraySource
,DateTimeSparseArraySource
,InstantArraySource
,InstantSparseArraySource
,LongArraySource
,LongSparseArraySource
,NanosBasedTimeArraySource
,NanosBasedTimeSparseArraySource
,ReadOnlyRedirectedColumnSource
,RedirectedColumnSource
,ShiftedColumnSource
,ZonedDateTimeArraySource
,ZonedDateTimeSparseArraySource
public interface ConvertableTimeSource
An interface for
ColumnSource
s that indicate that it both represents a time value, and may be converted
between other common time values efficiently.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if this class supports time conversion.Convert this source to aDBDateTime
source.Convert this source to along
source of nanoseconds of epoch.Convert this source to anInstant
source.toLocalDate
(ZoneId zone) toLocalTime
(ZoneId zone) toZonedDateTime
(ZoneId zone) Convert this source to aZonedDateTime
source at the specifiedzone
.
-
Method Details
-
toZonedDateTime
Convert this source to aZonedDateTime
source at the specifiedzone
.- Parameters:
zone
- the time zone- Returns:
- a view of this source as a
ZonedDateTime
-
toLocalDate
- Parameters:
zone
- the time zone- Returns:
- a view of this source as a
LocalDate
-
toLocalTime
- Parameters:
zone
- the time zone- Returns:
- a view of this source as a
LocalTime
-
toInstant
ColumnSource<Instant> toInstant()Convert this source to anInstant
source.- Returns:
- a view of this source as a
Instant
-
toDBDateTime
ColumnSource<DBDateTime> toDBDateTime()Convert this source to aDBDateTime
source.- Returns:
- a view of this source as a
DBDateTime
-
toEpochNano
ColumnSource<Long> toEpochNano()Convert this source to along
source of nanoseconds of epoch.- Returns:
- a view of this source as a
ZonedDateTime
-
supportsTimeConversion
boolean supportsTimeConversion()Check if this class supports time conversion. If false, all other methods will fail.- Returns:
- true if time conversion is supported.
-