Package org.djutils.data
Class Column<T>
- java.lang.Object
-
- org.djutils.data.Column<T>
-
- Type Parameters:
T
- value type
- All Implemented Interfaces:
Serializable
,Identifiable
public class Column<T> extends Object implements Identifiable, Serializable
Column identifier and descriptor.Copyright (c) 2020-2023 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Column(String id, String description, Class<T> valueType)
Make a new column for a table with an id, description, type.Column(String id, String description, Class<T> valueType, String unit)
Make a new column for a table with an id, description, type, and unit.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getDescription()
Returns the column description.String
getId()
String
getUnit()
Returns the unit of the column.Class<T>
getValueType()
Returns the type of the values in the column.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
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 columndescription
- String; description of the columnvalueType
- Class<T>; value type of the columnunit
- String; unit, may benull
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getId
in interfaceIdentifiable
-
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
-
-