Class Column<T>

java.lang.Object
org.djutils.data.Column<T>
Type Parameters:
T - value type
All Implemented Interfaces:
Serializable, org.djutils.base.Identifiable

public class Column<T> extends Object implements org.djutils.base.Identifiable, Serializable
Column identifier and descriptor.

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
See Also:
  • Constructor Details

    • Column

      public Column(String id, String description, Class<T> valueType, String unit)
      Make a new column for a table with an id, description, type, and unit.
      Parameters:
      id - String; id of the column
      description - String; description of the column
      valueType - Class<T>; value type of the column
      unit - String; unit, may be null
    • Column

      public Column(String id, String description, Class<T> valueType)
      Make a new column for a table with an id, description, type. The unit is blank (null).
      Parameters:
      id - String; id of the column
      description - String; description of the column
      valueType - Class<T>; value type of the column
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface org.djutils.base.Identifiable
    • getDescription

      public String getDescription()
      Returns the column description.
      Returns:
      String; column description
    • getValueType

      public Class<T> getValueType()
      Returns the type of the values in the column.
      Returns:
      Class<?>; type of the values in the column
    • getUnit

      public String getUnit()
      Returns the unit of the column. Data is written an read using this unit.
      Returns:
      String; unit of the column
    • 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