Package org.djutils.data
Class AbstractDataTable
java.lang.Object
org.djutils.data.AbstractDataTable
- All Implemented Interfaces:
Iterable<DataRecord>
,org.djutils.base.Identifiable
,DataTable
- Direct Known Subclasses:
ListDataTable
public abstract class AbstractDataTable extends Object implements DataTable
Abstract
Table
implementation taking care of the columns.
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
-
Constructor Summary
Constructors Constructor Description AbstractDataTable(String id, String description, org.djutils.immutablecollections.ImmutableList<DataColumn<?>> columns)
Constructor for the data table using an ImmutableCollection for the columns. -
Method Summary
Modifier and Type Method Description org.djutils.immutablecollections.ImmutableList<DataColumn<?>>
getColumns()
Returns the list of columns.String
getDescription()
Returns the description.String
getId()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.djutils.data.DataTable
getColumnDataTypes, getColumnDataTypeStrings, getColumnDescriptions, getColumnIds, getNumberOfColumns, isEmpty
-
Constructor Details
-
AbstractDataTable
public AbstractDataTable(String id, String description, org.djutils.immutablecollections.ImmutableList<DataColumn<?>> columns)Constructor for the data table using an ImmutableCollection for the columns.- Parameters:
id
- String; iddescription
- String; descriptioncolumns
- ImmutableList<Column<?>>; columns- Throws:
NullPointerException
- when id, description or columns is nullIllegalArgumentException
- when id is empty or there are zero columns
-
-
Method Details
-
getColumns
Returns the list of columns.- Specified by:
getColumns
in interfaceDataTable
- Returns:
- list of columns
-
getId
- Specified by:
getId
in interfaceorg.djutils.base.Identifiable
-
getDescription
Returns the description.- Specified by:
getDescription
in interfaceDataTable
- Returns:
- description
-