Interface DataTable

All Superinterfaces:
org.djutils.base.Identifiable, Iterable<DataRecord>
All Known Implementing Classes:
AbstractDataTable, ListDataTable

public interface DataTable
extends Iterable<DataRecord>, org.djutils.base.Identifiable
Table with data stored in structured records.

Copyright (c) 2020-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Method Details

    • getDescription

      String getDescription()
      Returns the description.
      Returns:
      description
    • getColumns

      org.djutils.immutablecollections.ImmutableList<DataColumn<?>> getColumns()
      Returns the list of columns.
      Returns:
      list of columns
    • getNumberOfColumns

      default int getNumberOfColumns()
      Returns the number of columns.
      Returns:
      number of columns
    • isEmpty

      boolean isEmpty()
      Returns whether the table is empty.
      Returns:
      whether the table is empty
    • getColumnIds

      default String[] getColumnIds()
      Return the column ids as a String[].
      Returns:
      String[]; the column ids
    • getColumnDescriptions

      default String[] getColumnDescriptions()
      Return the column descriptions as a String[].
      Returns:
      String[] the column headers
    • getColumnDataTypes

      default Class<?>[] getColumnDataTypes()
      Return the column data types as a Class<?>[].
      Returns:
      Class<?>[] the column data types
    • getColumnDataTypeStrings

      default String[] getColumnDataTypeStrings()
      Return the column data types as a String[]. Each data type is presented as the full class name or the primitive name. In case of an array, the result is preceded by an "[" for each dimension. After one or more "[" symbols, the class name is preceded by an "L" for a non-primitive class or interface, and by "I" for integer, "Z" for boolean, "B" for byte, "C" for char, "D" for double, "F" for float, "J" for long and "S" for short. So for a column with a double, "double" is returned. For a column with a "Double", "java.lang.Double" is returned, for an int[][], "[[I" is returned, and for a Long[], "[Ljava.lang.Long" is returned.
      Returns:
      String[] the column data types as an array of Strings