Class DataItem


  • public final class DataItem
    extends Object
    This object is wrapping the value of data set which can be used in the plugins (extensions) callbacks.
    The value could be a double, string or a FloatingData if the data set is a BAR data set and uses floating bars data.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • DataItem

        public DataItem​(Object object)
        Creates the object with object which represents the value.
        Parameters:
        object - object which represents the value.
    • Method Detail

      • getDataType

        public DataType getDataType()
        Returns the data type of value.
        Returns:
        the data type of value
      • getValue

        public double getValue()
        Returns the value for the data set if it is or Undefined.DOUBLE.
        Returns:
        the value for the data set if it is or Undefined.DOUBLE
      • getValueAsFloatingData

        public FloatingData getValueAsFloatingData()
        Returns the value for the data set as FloatingData if it is or null.
        Returns:
        the value for the data set as FloatingData if it is or null
      • getValueAsString

        public String getValueAsString()
        Returns the value for the data set as string if it is or Undefined.STRING.
        Returns:
        the value for the data set as string if it is or Undefined.STRING.
      • getValueAsDataPoint

        public DataPoint getValueAsDataPoint()
        Returns the value for the data set as DataPoint if it is or null.
        Returns:
        the value for the data set as DataPoint if it is or null.
      • createDataPoint

        public final <T extends NativeObjectContainer> T createDataPoint​(NativeObjectContainerFactory<T> factory)
        Returns a data point to be mapped for customization, like for out of the box controllers. It uses a factory instance to create a data point.
        If factory argument is not consistent, null is returned.
        Type Parameters:
        T - type of data point to return
        Parameters:
        factory - factory instance to create a data point
        Returns:
        data point to be mapped for customization. If factory argument is not consistent, null is returned.