Interface TupleAccessor


public interface TupleAccessor
Easy to be used for auto-casting on values of a tuple.
  • Method Details

    • getValue

      <T> T getValue(String name)
      Gets the value of a column with auto-casting.
      Type Parameters:
      T - Expected type of the column
      Parameters:
      name - Name of the column
      Returns:
      Value of the column
      Throws:
      ClassCastException - When the value cannot be casted to the expected type
      IllegalArgumentException - When the column name is not existing
      See Also:
    • setValue

      <T> void setValue(String name, T value)
      Sets the value of a column.
      Type Parameters:
      T - Type of the value
      Parameters:
      name - Name of the column
      value - Value to be set
      Throws:
      IllegalArgumentException - When the column name is not existing
      See Also:
    • hasColumn

      boolean hasColumn(String name)
      Checks whether or not the generated row has the given column.
      Parameters:
      name - Name of the column
      Returns:
      true if the generated row has the given column; false otherwise
    • getMetaOfColumns

      List<ColumnMeta> getMetaOfColumns()
      Gets metadata of all columns of the generated row.
      Returns:
      List of ColumnMeta of all columns
    • asMap

      Gets all columns as a map.
      Returns:
      read-only Map with duplicated column names and their values
    • index

      int index()
      Gets the index(starts with 0) for the TableFacet.
      Returns:
      Index for of generated rows on the TableFacet