Class OhlcvDataSet

    • Constructor Detail

      • OhlcvDataSet

        public OhlcvDataSet​(java.lang.String title)
    • Method Detail

      • setData

        public void setData​(IOhlcv ohlcv)
        Set the domain object with OHLCV data.
        Parameters:
        ohlcv - connection with OHLCV data from financial framework.
      • getData

        public IOhlcv getData()
        Returns:
        get domain object
      • isCategoryBased

        public boolean isCategoryBased()
        Returns:
        is true for a category axis support
      • setCategoryBased

        public void setCategoryBased​(boolean categoryBased)
        Change category or time based axis handling.
        Parameters:
        categoryBased - if true; category based indexes are used. Default false.
      • get

        public double get​(int dimIndex,
                          int index)
        Description copied from interface: DataSet
        Gets the x value of the data point with the index i
        Specified by:
        get in interface DataSet
        Parameters:
        dimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')
        index - data point index
        Returns:
        the x value
      • iterator

        public java.util.Iterator<IOhlcvItem> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<IOhlcvItem>
      • getDataCount

        public int getDataCount()
        Description copied from interface: DataSet
        Get the number of data points in the data set.
        Specified by:
        getDataCount in interface DataSet
        Returns:
        the number of data points
      • set

        public DataSet set​(DataSet other,
                           boolean copy)
        Specified by:
        set in interface DataSet
        Parameters:
        other - Other DataSet to copy into this DataSet
        copy - true: perform a deep copy (default), false: reuse the other dataset's internal data structures (if applicable)
        Returns:
        itself (fluent design) -- N.B. existing update listener are preserved
      • getXIndex

        public int getXIndex​(double x)
        Gets the index of the data point closest to the given x coordinate. If the x coordinate lies outside the range of the data set, the index of the first/last point is returned.
        Parameters:
        x - the x position of the data point
        Returns:
        the index of the data point
      • getItem

        public IOhlcvItem getItem​(int index)
        Description copied from interface: IOhlcvItemAware
        Provides OHLCV domain object with extensions
        Specified by:
        getItem in interface IOhlcvItemAware
        Parameters:
        index - to the dataset/domain structure
        Returns:
        the filled ohlcv item