Package org.djutils.data
Class AbstractDataTable
- java.lang.Object
-
- org.djutils.data.AbstractDataTable
-
- All Implemented Interfaces:
Iterable<DataRecord>
,Identifiable
,DataTable
- Direct Known Subclasses:
ListDataTable
public abstract class AbstractDataTable extends Object implements DataTable
AbstractTable
implementation taking care of the columns.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
-
-
Constructor Summary
Constructors Constructor Description AbstractDataTable(String id, String description, ImmutableList<DataColumn<?>> columns)
Constructor for the data table using an ImmutableCollection for the columns.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Constructor Detail
-
AbstractDataTable
public AbstractDataTable(String id, String description, ImmutableList<DataColumn<?>> columns)
Constructor for the data table using an ImmutableCollection for the columns.- Parameters:
id
- String; iddescription
- String; descriptioncolumns
- ImmutableList<DataColumn<?>>; columns- Throws:
NullPointerException
- when id, description or columns is nullIllegalArgumentException
- when id is empty or there are zero columns
-
-
Method Detail
-
getColumns
public ImmutableList<DataColumn<?>> getColumns()
Returns the list of columns.- Specified by:
getColumns
in interfaceDataTable
- Returns:
- list of columns
-
getId
public String getId()
- Specified by:
getId
in interfaceIdentifiable
-
getDescription
public String getDescription()
Returns the description.- Specified by:
getDescription
in interfaceDataTable
- Returns:
- description
-
-