View Javadoc
1   package org.djutils.data;
2   
3   /**
4    * Consistent set of values corresponding to columns. 
5    * <p>
6    * Copyright (c) 2020-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
7    * BSD-style license. See <a href="https://opentrafficsim.org/docs/current/license.html">OpenTrafficSim License</a>.
8    * </p>
9    * @author <a href="https://www.tudelft.nl/averbraeck">Alexander Verbraeck</a>
10   * @author <a href="https://www.tudelft.nl/pknoppers">Peter Knoppers</a>
11   * @author <a href="https://www.transport.citg.tudelft.nl">Wouter Schakel</a>
12   */
13  public interface DataRecord
14  {
15      
16      /**
17       * Returns the column value of this record.
18   * @param column DataColumn&lt;T&gt;; column
19  
20       * @param <T> value type
21       * @return T; the column value in this record
22       */
23      <T> T getValue(DataColumn<T> column);
24      
25      /**
26       * Returns the column value of this record.
27       * @param id String; column id
28       * @return Object; the column value in this record
29       */
30      Object getValue(String id);
31  
32      /**
33       * Returns the column values of this record in the natural order of the columns.
34       * @return the column value in this record
35       */
36      Object[] getValues();
37  
38  }