G - gtu data typepublic abstract class ExtendedDataTypeLength<G extends GtuDataInterface> extends ExtendedDataTypeFloat<LengthUnit,FloatLength,FloatLengthVector,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 |
|---|
ExtendedDataTypeLength(String id)
Constructor setting the id.
|
| Modifier and Type | Method and Description |
|---|---|
protected FloatLengthVector |
convert(float[] storage)
Convert float array to typed array.
|
protected FloatLength |
convertValue(float value)
Convert float to typed value.
|
<AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>> |
interpolate(FloatLength value0,
FloatLength value1,
double f)
Interpolate value between two measured values.
|
convert, formatValue, getOutputValue, getStorageValue, initializeStorage, setValueequals, getId, getValue, hashCodepublic ExtendedDataTypeLength(String id)
id - String; idprotected final FloatLength convertValue(float value)
convertValue in class ExtendedDataTypeFloat<LengthUnit,FloatLength,FloatLengthVector,G extends GtuDataInterface>value - float; float valueprotected final FloatLengthVector convert(float[] storage) throws ValueException
convert in class ExtendedDataTypeFloat<LengthUnit,FloatLength,FloatLengthVector,G extends GtuDataInterface>storage - float[]; float array storageValueException - when float array cannot be convertedpublic <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>> FloatLength interpolate(FloatLength value0, FloatLength value1, double f)
DoubleScalar, FloatScalar, Double and Float, or the closest value in time otherwise.interpolate in class ExtendedDataType<FloatLength,FloatLengthVector,float[],G extends GtuDataInterface>AU - unit of value, if values are DoubleScalarRU - the corresponding relative unitvalue0 - T; first valuevalue1 - T; second valuef - double; interpolation fractionCopyright © 2014–2019 Delft University of Technology. All rights reserved.