Class Row

java.lang.Object
org.djutils.data.Row

public class Row extends Object
Row in a table.

Copyright (c) 2020-2024 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, Wouter Schakel
  • Constructor Details

    • Row

      public Row(Table table, Object[] values)
      Constructor.
      Parameters:
      table - Table; table.
      values - Object[]; values.
  • Method Details

    • getValue

      public <T> T getValue(Column<T> column)
      Returns the column value in this row. For performance, use getValue(int columnNumber).
      Type Parameters:
      T - value type.
      Parameters:
      column - Column<T>; column.
      Returns:
      T; the column value in this row.
    • getValue

      public Object getValue(String id)
      Returns the column value in this row. For performance, use getValue(int columnNumber).
      Parameters:
      id - String; column id.
      Returns:
      the column value in this row.
    • getValue

      public Object getValue(int columnNumber)
      Returns the column value in this row.
      Parameters:
      columnNumber - int; column number.
      Returns:
      Object; the column value in this row.
    • getValues

      public Object[] getValues()
      Returns the column values of this record in the natural order of the columns.
      Returns:
      Object[]; the column value in this record
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object