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 ColumnSources that indicate that it both represents a time value, and may be converted between other common time values efficiently.
  • Method Details

    • toZonedDateTime

      ColumnSource<ZonedDateTime> toZonedDateTime(ZoneId zone)
      Convert this source to a ZonedDateTime source at the specified zone.
      Parameters:
      zone - the time zone
      Returns:
      a view of this source as a ZonedDateTime
    • toLocalDate

      ColumnSource<LocalDate> toLocalDate(ZoneId zone)
      Convert this source to a LocalDate source at the specified zone.
      Parameters:
      zone - the time zone
      Returns:
      a view of this source as a LocalDate
    • toLocalTime

      ColumnSource<LocalTime> toLocalTime(ZoneId zone)
      Convert this source to a LocalTime source at the specified zone.
      Parameters:
      zone - the time zone
      Returns:
      a view of this source as a LocalTime
    • toInstant

      ColumnSource<Instant> toInstant()
      Convert this source to an Instant source.
      Returns:
      a view of this source asan Instant
    • toEpochNano

      ColumnSource<Long> toEpochNano()
      Convert this source to a long 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.