Package org.djutils.data
Interface DataTable
-
- All Superinterfaces:
Identifiable
,Iterable<DataRecord>
- All Known Implementing Classes:
AbstractDataTable
,ListDataTable
public interface DataTable extends Iterable<DataRecord>, Identifiable
Table with data stored in structured records.Copyright (c) 2020-2021 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUTILS License.- Author:
- Alexander Verbraeck, Peter Knoppers
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Class<?>[]
getColumnDataTypes()
Return the column data types as a Class<?>[].default String[]
getColumnDataTypeStrings()
Return the column data types as a String[].default String[]
getColumnDescriptions()
Return the column descriptions as a String[].default String[]
getColumnIds()
Return the column ids as a String[].ImmutableList<DataColumn<?>>
getColumns()
Returns the list of columns.String
getDescription()
Returns the description.default int
getNumberOfColumns()
Returns the number of columns.boolean
isEmpty()
Returns whether the table is empty.-
Methods inherited from interface org.djutils.base.Identifiable
getId
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
getDescription
String getDescription()
Returns the description.- Returns:
- description
-
getColumns
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
-
-