T - type in vectorO - vector typepublic abstract class ExtendedDataTypeFloat<T extends org.djunits.value.vfloat.scalar.AbstractFloatScalar<?,T>,O extends org.djunits.value.vfloat.vector.AbstractFloatVector<?,O>> extends ExtendedDataType<T,O,float[]>
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
ExtendedDataTypeFloat(String id)
Constructor setting the id.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract O |
convert(float[] storage)
Convert float array to typed array.
|
O |
convert(float[] storage,
int size)
Convert storage type to output type.
|
protected abstract T |
convertValue(float value)
Convert float to typed value.
|
String |
formatValue(String format,
T value)
Formats the value into a string.
|
T |
getOutputValue(O output,
int i)
Returns a specific output value.
|
T |
getStorageValue(float[] storage,
int i)
Returns a specific storage value.
|
float[] |
initializeStorage()
Returns an initial storage object.
|
float[] |
setValue(float[] storage,
int i,
T value)
Returns an updated list/array/vector of the storage type, including a new value at given index.
|
equals, getId, getValue, hashCode, interpolatepublic ExtendedDataTypeFloat(String id)
id - idpublic final float[] setValue(float[] storage,
int i,
T value)
setValue in class ExtendedDataType<T extends org.djunits.value.vfloat.scalar.AbstractFloatScalar<?,T>,O extends org.djunits.value.vfloat.vector.AbstractFloatVector<?,O>,float[]>storage - storagei - index to store next valuevalue - value to addpublic final float[] initializeStorage()
initializeStorage in class ExtendedDataType<T extends org.djunits.value.vfloat.scalar.AbstractFloatScalar<?,T>,O extends org.djunits.value.vfloat.vector.AbstractFloatVector<?,O>,float[]>public final String formatValue(String format, T value)
String.format(format, value.si);
formatValue in class ExtendedDataType<T extends org.djunits.value.vfloat.scalar.AbstractFloatScalar<?,T>,O extends org.djunits.value.vfloat.vector.AbstractFloatVector<?,O>,float[]>format - formatvalue - valuepublic final T getOutputValue(O output, int i) throws SamplingException
getOutputValue in class ExtendedDataType<T extends org.djunits.value.vfloat.scalar.AbstractFloatScalar<?,T>,O extends org.djunits.value.vfloat.vector.AbstractFloatVector<?,O>,float[]>output - outputi - index of value to returnSamplingException - when i is out of bounds.public T getStorageValue(float[] storage, int i) throws SamplingException
getStorageValue in class ExtendedDataType<T extends org.djunits.value.vfloat.scalar.AbstractFloatScalar<?,T>,O extends org.djunits.value.vfloat.vector.AbstractFloatVector<?,O>,float[]>storage - storagei - index of value to returnSamplingException - when i is out of bounds.protected abstract T convertValue(float value)
value - float valuepublic O convert(float[] storage, int size)
protected abstract O convert(float[] storage) throws org.djunits.value.ValueException
storage - float array storageorg.djunits.value.ValueException - when float array cannot be convertedCopyright © 2014–2017 Delft University of Technology. All rights reserved.