Class LocalDateWrapperSource

java.lang.Object
io.deephaven.engine.table.impl.AbstractColumnSource<LocalDate>
io.deephaven.engine.table.impl.sources.LocalDateWrapperSource
All Implemented Interfaces:
ChunkSource<Values>, ChunkSource.WithPrev<Values>, ColumnSource<LocalDate>, ElementSource<LocalDate>, FillContextMaker, GetContextMaker, ColumnSourceGetDefaults.ForObject<LocalDate>, DefaultChunkSource<Values>, DefaultChunkSource.WithPrev<Values>, MutableColumnSource<LocalDate>, MutableColumnSourceGetDefaults.ForObject<LocalDate>, Releasable, TupleExporter<LocalDate>, TupleSource<LocalDate>

public class LocalDateWrapperSource extends AbstractColumnSource<LocalDate> implements MutableColumnSourceGetDefaults.ForObject<LocalDate>
A ColumnSource for LocalDates that is backed by an inner ColumnSource of ZonedDateTime. Note that no special handling is done for timezones. The returned local time will be in the zone of each inner ZonedDateTime.
  • Constructor Details

  • Method Details

    • allowsReinterpret

      public <ALTERNATE_DATA_TYPE> boolean allowsReinterpret(@NotNull @NotNull Class<ALTERNATE_DATA_TYPE> alternateDataType)
      Description copied from interface: ColumnSource
      Test if a reinterpret call will succeed.
      Specified by:
      allowsReinterpret in interface ColumnSource<LocalDate>
      Overrides:
      allowsReinterpret in class AbstractColumnSource<LocalDate>
      Parameters:
      alternateDataType - The alternative type to consider
      Returns:
      If a reinterpret on this column source with the supplied alternateDataType will succeed.
    • doReinterpret

      protected <ALTERNATE_DATA_TYPE> ColumnSource<ALTERNATE_DATA_TYPE> doReinterpret(@NotNull @NotNull Class<ALTERNATE_DATA_TYPE> alternateDataType)
      Description copied from class: AbstractColumnSource
      Supply allowed reinterpret results. The default implementation handles the most common case to avoid code duplication.
      Overrides:
      doReinterpret in class AbstractColumnSource<LocalDate>
      Parameters:
      alternateDataType - The alternate data type
      Returns:
      The resulting ColumnSource
    • get

      @Nullable public @Nullable LocalDate get(long rowKey)
      Description copied from interface: ElementSource
      Get the value from the source. This may return boxed values for basic types. RowKeys that are not present are undefined.
      Specified by:
      get in interface ElementSource<LocalDate>
      Parameters:
      rowKey - the location in key space to get the value from.
      Returns:
      the value at the rowKey, potentially null.
    • getPrev

      @Nullable public @Nullable LocalDate getPrev(long rowKey)
      Description copied from interface: ElementSource
      Get the previous value at the rowKey. Previous values are used during an UG update cycle to process changes in data. During normal operation previous values will be identical to current values. RowKeys that were not present are undefined.
      Specified by:
      getPrev in interface ElementSource<LocalDate>
      Parameters:
      rowKey - the location in key space to get the value from.
      Returns:
      the previous value at the rowKey, potentially null.
    • makeFillContext

      public ChunkSource.FillContext makeFillContext(int chunkCapacity, SharedContext sharedContext)
      Description copied from interface: FillContextMaker
      Allocate a new ChunkSource.FillContext for filling chunks from this FillContextMaker, typically a ChunkSource.
      Specified by:
      makeFillContext in interface DefaultChunkSource<Values>
      Specified by:
      makeFillContext in interface FillContextMaker
      Parameters:
      chunkCapacity - The maximum size of any WritableChunk that will be filled with this context
      sharedContext - Shared store of intermediate results.
      Returns:
      A context for use with fill operations
    • fillChunk

      public void fillChunk(@NotNull ChunkSource.FillContext context, @NotNull @NotNull WritableChunk<? super Values> dest, @NotNull @NotNull RowSequence rowSequence)
      Description copied from interface: ChunkSource
      Populates the given destination chunk with data corresponding to the keys from the given RowSequence.
      Specified by:
      fillChunk in interface ChunkSource<Values>
      Overrides:
      fillChunk in class AbstractColumnSource<LocalDate>
      Parameters:
      context - A context containing all mutable/state related data used in retrieving the Chunk.
      dest - The chunk to be populated according to rowSequence. No assumptions shall be made about the size of the chunk shall be made. The chunk will be populated from position [0,rowSequence.size()).
      rowSequence - An RowSequence representing the keys to be fetched
    • fillPrevChunk

      public void fillPrevChunk(@NotNull ChunkSource.FillContext context, @NotNull @NotNull WritableChunk<? super Values> dest, @NotNull @NotNull RowSequence rowSequence)
      Description copied from interface: ChunkSource.WithPrev
      Populates the given destination chunk with data corresponding to the keys from the given RowSequence.
      Specified by:
      fillPrevChunk in interface ChunkSource.WithPrev<Values>
      Overrides:
      fillPrevChunk in class AbstractColumnSource<LocalDate>
      Parameters:
      context - A context containing all mutable/state related data used in retrieving the Chunk.
      dest - The chunk to be populated according to rowSequence. No assumptions shall be made about the size of the chunk shall be made. The chunk will be populated from position [0,rowSequence.size()).
      rowSequence - An RowSequence representing the keys to be fetched