Interface IXYTimeSeriesDatasetBuilder<T extends IXYTimeSeriesDatasetBuilder<T>>

Type Parameters:
T - The method chaining return type, which must be the type of the builder implementing this interface.
All Known Implementing Classes:
OhlcSeriesBuilder, VolumeXYTimeSeriesBuilder

public interface IXYTimeSeriesDatasetBuilder<T extends IXYTimeSeriesDatasetBuilder<T>>
Interface for all time series based dataset builders. Uses a generic to specify the concrete implementation of the interface as the return type of setter methods. This is done to support method chaining on the same builder instance. In this framework there can be different builder types that have specialized methods. If the return types were made to be this interface instead of the concrete class then those specialized methods of the classes not defined in the interface would be hidden by only having access to the interface.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.jfree.data.xy.XYDataset
    Builds the XYDataset
    Sets the zero-based index range used to index into all source data for building the XYDataset.
    timeData(long[] timeData)
    Sets the time data to be used for generating the XYDataset.
  • Method Details

    • timeData

      T timeData(long[] timeData)
      Sets the time data to be used for generating the XYDataset.
      Parameters:
      timeData - Ascending date-time values represented as milliseconds since the epoch start
      Returns:
      Reference to this builder instance for method chaining
    • indexRange

      T indexRange(ZeroBasedIndexRange indexRange)
      Sets the zero-based index range used to index into all source data for building the XYDataset. This is an optimization to allow clients to supply existing data without having to copy and/or crop it to match the desired size in chart.
      Parameters:
      indexRange - The index range to be set
      Returns:
      Reference to this builder instance for method chaining
    • build

      org.jfree.data.xy.XYDataset build() throws IllegalStateException
      Builds the XYDataset
      Returns:
      New instance of the corresponding XYDataset
      Throws:
      IllegalStateException - If source array sizes don't match or if an index range is configured and its indexes are out of bounds.