package org.opentrafficsim.kpi.sampling; import org.djutils.immutablecollections.ImmutableList; import org.opentrafficsim.base.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 OpenTrafficSim License. *

* @author Alexander Verbraeck * @author Peter Knoppers * @author Wouter Schakel */ public interface Table extends Iterable, Identifiable { /** * Returns the description. * @return description */ String getDescription(); /** * Returns the list of columns. * @return list of columns */ ImmutableList> getColumns(); /** * Returns the number of columns. * @return number of columns */ default int getNumberOfColumns() { return getColumns().size(); } /** * Returns whether the table is empty. * @return whether the table is empty */ boolean isEmpty(); }