Class ExtendedDataFloat<U extends Unit<U>,​T extends AbstractFloatScalar<U,​T>,​O extends AbstractFloatVector<U,​T,​O>,​G extends GtuData>

    • Constructor Detail

      • ExtendedDataFloat

        public ExtendedDataFloat​(String id,
                                 String description,
                                 Class<T> type)
        Constructor setting the id.
        Parameters:
        id - String; id
        description - String; description
        type - Class<T>; type class
    • Method Detail

      • setValue

        public final 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.
        Specified by:
        setValue in class ExtendedDataType<T extends AbstractFloatScalar<U,​T>,​O extends AbstractFloatVector<U,​T,​O>,​float[],​G extends GtuData>
        Parameters:
        storage - S; storage
        i - int; index to store next value
        value - T; value to add
        Returns:
        updated list/array/vector of the storage type, including a new value at given index
      • convertValue

        protected abstract T convertValue​(float value)
        Convert float to typed value.
        Parameters:
        value - float; float value
        Returns:
        typed value
      • convert

        protected abstract O convert​(float[] storage)
                              throws ValueRuntimeException
        Convert float array to typed array.
        Parameters:
        storage - float[]; float array storage
        Returns:
        typed array
        Throws:
        ValueRuntimeException - when float array cannot be converted