Class ExtendedDataList<T,G extends GtuData>
java.lang.Object
org.opentrafficsim.kpi.sampling.DataType<T,G>
org.opentrafficsim.kpi.sampling.data.ExtendedDataType<T,List<T>,List<T>,G>
org.opentrafficsim.kpi.sampling.data.ExtendedDataList<T,G>
- Type Parameters:
T
- type of valueG
- GTU data type
- All Implemented Interfaces:
org.djutils.base.Identifiable
- Direct Known Subclasses:
ExtendedDataString
public abstract class ExtendedDataList<T,G extends GtuData>
extends ExtendedDataType<T,List<T>,List<T>,G>
Extended data type for anything that can be captured in a list. Typically, these are non-numeric objects.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConvert storage type to output type.getOutputValue
(List<T> output, int i) Returns a specific output value.getStorageValue
(List<T> output, int i) Returns a specific storage value.Returns an initial storage object.Returns an updated list/array/vector of the storage type, including a new value at given index.Methods inherited from class org.opentrafficsim.kpi.sampling.data.ExtendedDataType
getValue, interpolate, parseValue, toString
-
Constructor Details
-
ExtendedDataList
Constructor.- Parameters:
id
- iddescription
- descriptiontype
- type class
-
-
Method Details
-
getOutputValue
Description copied from class:ExtendedDataType
Returns a specific output value. This is used to store extended data types as generic file, i.e. text file.- Specified by:
getOutputValue
in classExtendedDataType<T,
List<T>, List<T>, G extends GtuData> - Parameters:
output
- outputi
- index of value to return- Returns:
- the i'th output value o
-
getStorageValue
Description copied from class:ExtendedDataType
Returns a specific storage value. This is used to bypass conversion to the output type when trajectories are cut.- Specified by:
getStorageValue
in classExtendedDataType<T,
List<T>, List<T>, G extends GtuData> - Parameters:
output
- storagei
- index of value to return- Returns:
- the i'th output value
-
setValue
Description copied from class:ExtendedDataType
Returns an updated list/array/vector of the storage type, including a new value at given index. -
initializeStorage
Description copied from class:ExtendedDataType
Returns an initial storage object.- Specified by:
initializeStorage
in classExtendedDataType<T,
List<T>, List<T>, G extends GtuData> - Returns:
- initial storage object
-
convert
Description copied from class:ExtendedDataType
Convert storage type to output type.
-