Class UnboxedByteBackedColumnSource<T>

java.lang.Object
com.illumon.iris.db.v2.sources.AbstractColumnSource<Byte>
com.illumon.iris.db.v2.sources.UnboxedByteBackedColumnSource<T>
All Implemented Interfaces:
ChunkSource<Attributes.Values>, ChunkSource.WithPrev<Attributes.Values>, DefaultChunkSource<Attributes.Values>, DefaultChunkSource.WithPrev<Attributes.Values>, FillContextMaker, GetContextMaker, ColumnSource<Byte>, ColumnSourceGetDefaults.ForByte, ElementSource<Byte>, MutableColumnSource<Byte>, MutableColumnSourceGetDefaults.ForByte, Releasable, TupleExporter<Byte>, TupleSource<Byte>, Serializable

public class UnboxedByteBackedColumnSource<T> extends AbstractColumnSource<Byte> implements MutableColumnSourceGetDefaults.ForByte
Reinterpret result for many ColumnSource implementations that internally represent Boolean values as byte values.
See Also:
  • Constructor Details

    • UnboxedByteBackedColumnSource

      public UnboxedByteBackedColumnSource(ColumnSource<T> alternateColumnSource)
  • Method Details

    • getByte

      public byte getByte(long index)
      Description copied from interface: ElementSource
      Get the value at the index as a byte.
      Specified by:
      getByte in interface ElementSource<T>
      Parameters:
      index - the location in index space to get the value from.
      Returns:
      the boolean at the index, null values are represented by QueryConstants.NULL_BYTE
    • getPrevByte

      public byte getPrevByte(long index)
      Description copied from interface: ElementSource
      Get the previous value at the index as a byte. See ElementSource.getPrev(long) for more details.
      Specified by:
      getPrevByte in interface ElementSource<T>
      Parameters:
      index - the location in index space to get the previous value from.
      Returns:
      the previous boolean at the index, null values are represented by QueryConstants.NULL_BYTE
    • isImmutable

      public boolean isImmutable()
      Description copied from interface: ColumnSource
      Determine if this column source is immutable, meaning that the values at a given index key never change.
      Specified by:
      isImmutable in interface ColumnSource<T>
      Specified by:
      isImmutable in interface MutableColumnSource<T>
      Returns:
      true if the values at a given index of the column source never change, false otherwise
    • allowsReinterpret

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

      public <ALTERNATE_DATA_TYPE> ColumnSource<ALTERNATE_DATA_TYPE> doReinterpret(@NotNull Class<ALTERNATE_DATA_TYPE> alternateDataType) throws IllegalArgumentException
      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<Byte>
      Type Parameters:
      ALTERNATE_DATA_TYPE - the dataType to reinterpret to
      Parameters:
      alternateDataType - The alternate data type
      Returns:
      The resulting ColumnSource
      Throws:
      IllegalArgumentException