T
- type of valueG
- gtu data typepublic abstract class ExtendedDataTypeList<T,G extends GtuDataInterface> extends ExtendedDataType<T,List<T>,List<T>,G>
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
ExtendedDataTypeList(String id)
Constructor setting the id.
|
Modifier and Type | Method and Description |
---|---|
List<T> |
convert(List<T> storage,
int size)
Convert storage type to output type.
|
T |
getOutputValue(List<T> output,
int i)
Returns a specific output value.
|
T |
getStorageValue(List<T> output,
int i)
Returns a specific storage value.
|
List<T> |
initializeStorage()
Returns an initial storage object.
|
List<T> |
setValue(List<T> storage,
int index,
T value)
Returns an updated list/array/vector of the storage type, including a new value at given index.
|
equals, formatValue, getId, getValue, hashCode, interpolate
public ExtendedDataTypeList(String id)
id
- String; idpublic T getOutputValue(List<T> output, int i) throws SamplingException
getOutputValue
in class ExtendedDataType<T,List<T>,List<T>,G extends GtuDataInterface>
output
- O; outputi
- int; index of value to returnSamplingException
- when i
is out of bounds.public T getStorageValue(List<T> output, int i) throws SamplingException
getStorageValue
in class ExtendedDataType<T,List<T>,List<T>,G extends GtuDataInterface>
output
- S; storagei
- int; index of value to returnSamplingException
- when i
is out of bounds.public List<T> setValue(List<T> storage, int index, T value)
setValue
in class ExtendedDataType<T,List<T>,List<T>,G extends GtuDataInterface>
storage
- S; storageindex
- int; index to store next valuevalue
- T; value to addpublic List<T> initializeStorage()
initializeStorage
in class ExtendedDataType<T,List<T>,List<T>,G extends GtuDataInterface>
Copyright © 2014–2019 Delft University of Technology. All rights reserved.