Class DefaultIntervalXYDataset

    • Constructor Detail

      • DefaultIntervalXYDataset

        public DefaultIntervalXYDataset()
        Creates a new DefaultIntervalXYDataset instance, initially containing no data.
    • Method Detail

      • getItemCount

        public int getItemCount​(int series)
        Returns the number of items in the specified series.
        Specified by:
        getItemCount in interface XYDataset
        Parameters:
        series - the series index (in the range 0 to getSeriesCount() - 1).
        Returns:
        The item count.
        Throws:
        IllegalArgumentException - if series is not in the specified range.
      • getX

        public Number getX​(int series,
                           int item)
        Returns the x-value for an item within a series.
        Specified by:
        getX in interface XYDataset
        Parameters:
        series - the series index (in the range 0 to getSeriesCount() - 1).
        item - the item index (in the range 0 to getItemCount(series)).
        Returns:
        The x-value.
        Throws:
        ArrayIndexOutOfBoundsException - if series is not within the specified range.
        ArrayIndexOutOfBoundsException - if item is not within the specified range.
        See Also:
        getXValue(int, int)
      • getY

        public Number getY​(int series,
                           int item)
        Returns the y-value for an item within a series.
        Specified by:
        getY in interface XYDataset
        Parameters:
        series - the series index (in the range 0 to getSeriesCount() - 1).
        item - the item index (in the range 0 to getItemCount(series)).
        Returns:
        The y-value.
        Throws:
        ArrayIndexOutOfBoundsException - if series is not within the specified range.
        ArrayIndexOutOfBoundsException - if item is not within the specified range.
        See Also:
        getYValue(int, int)
      • addSeries

        public void addSeries​(Comparable seriesKey,
                              double[][] data)
        Adds a series or if a series with the same key already exists replaces the data for that series, then sends a DatasetChangeEvent to all registered listeners.
        Parameters:
        seriesKey - the series key (null not permitted).
        data - the data (must be an array with length 6, containing six arrays of equal length, the first three containing the x-values (x, xLow and xHigh) and the last three containing the y-values (y, yLow and yHigh)).
      • equals

        public boolean equals​(Object obj)
        Tests this DefaultIntervalXYDataset instance for equality with an arbitrary object. This method returns true if and only if:
        • obj is not null;
        • obj is an instance of DefaultIntervalXYDataset;
        • both datasets have the same number of series, each containing exactly the same values.
        Overrides:
        equals in class Object
        Parameters:
        obj - the object (null permitted).
        Returns:
        A boolean.
      • hashCode

        public int hashCode()
        Returns a hash code for this instance.
        Overrides:
        hashCode in class Object
        Returns:
        A hash code.