Interface ConvertibleTimeSource
- All Known Implementing Classes:
Immutable2DInstantArraySource
,Immutable2DLongArraySource
,Immutable2DNanosBasedTimeArraySource
,Immutable2DZonedDateTimeArraySource
,ImmutableConstantInstantSource
,ImmutableConstantLongSource
,ImmutableConstantNanosBasedTimeSource
,ImmutableConstantZonedDateTimeSource
,ImmutableInstantArraySource
,ImmutableLongArraySource
,ImmutableNanosBasedTimeArraySource
,ImmutableZonedDateTimeArraySource
,InstantArraySource
,InstantSparseArraySource
,LongArraySource
,LongAsInstantColumnSource
,LongAsLocalDateColumnSource
,LongAsLocalTimeColumnSource
,LongAsTimeSource
,LongAsZonedDateTimeColumnSource
,LongSparseArraySource
,NanosBasedTimeArraySource
,NanosBasedTimeSparseArraySource
,RedirectedColumnSource
,ShiftedColumnSource
,WritableRedirectedColumnSource
,ZonedDateTimeArraySource
,ZonedDateTimeSparseArraySource
public interface ConvertibleTimeSource
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if this class supports time conversion.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 asan
Instant
-
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.
-