Package org.jfree.data
Class SubSeriesDataset
java.lang.Object
org.jfree.data.AbstractDataset
org.jfree.data.AbstractSeriesDataset
org.jfree.data.AbstractXYDataset
org.jfree.data.AbstractIntervalXYDataset
org.jfree.data.SubSeriesDataset
- All Implemented Interfaces:
ObjectInputValidation,Serializable,Cloneable,EventListener,CombinationDataset,Dataset,HighLowDataset,IntervalXYDataset,SeriesChangeListener,SeriesDataset,SignalsDataset,XYDataset
public class SubSeriesDataset extends AbstractIntervalXYDataset implements HighLowDataset, SignalsDataset, IntervalXYDataset, CombinationDataset
This class will create a dataset with one or more series from another
SeriesDataset.- Author:
- Bill Kelemen (bill@kelemen-usa.com)
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from interface org.jfree.data.SignalsDataset
ENTER_LONG, ENTER_SHORT, EXIT_LONG, EXIT_SHORT -
Constructor Summary
Constructors Constructor Description SubSeriesDataset(SeriesDataset parent, int series)Creates a SubSeriesDataset using one series fromparent.SubSeriesDataset(SeriesDataset parent, int[] map)Creates a SubSeriesDataset using one or more series fromparent. -
Method Summary
Modifier and Type Method Description doublegetClose(int series, int item)Returns the close-value (as a double primitive) for an item within a series.NumbergetCloseValue(int series, int item)Returns the close-value for the specified series and item.NumbergetEndXValue(int series, int item)Returns the ending X value for the specified series and item.NumbergetEndYValue(int series, int item)Returns the ending Y value for the specified series and item.doublegetHigh(int series, int item)Returns the high-value (as a double primitive) for an item within a series.NumbergetHighValue(int series, int item)Returns the high-value for the specified series and item.intgetItemCount(int series)Returns the number of items in a series.doublegetLevel(int series, int item)Returns the level.doublegetLow(int series, int item)Returns the low-value (as a double primitive) for an item within a series.NumbergetLowValue(int series, int item)Returns the low-value for the specified series and item.int[]getMap()Returns a map or indirect indexing form our series into parent's series.doublegetOpen(int series, int item)Returns the open-value (as a double primitive) for an item within a series.NumbergetOpenValue(int series, int item)Returns the open-value for the specified series and item.SeriesDatasetgetParent()Returns the parent Dataset of this combination.intgetSeriesCount()Returns the number of series in the dataset.StringgetSeriesName(int series)Returns the name of a series.NumbergetStartXValue(int series, int item)Returns the starting X value for the specified series and item.NumbergetStartYValue(int series, int item)Returns the starting Y value for the specified series and item.intgetType(int series, int item)Returns the type.doublegetVolume(int series, int item)Returns the volume-value (as a double primitive) for an item within a series.NumbergetVolumeValue(int series, int item)Returns the volume.NumbergetXValue(int series, int item)Returns the X-value for the specified series and item.NumbergetYValue(int series, int item)Returns the Y-value for the specified series and item.Methods inherited from class org.jfree.data.AbstractIntervalXYDataset
getEndX, getEndY, getStartX, getStartYMethods inherited from class org.jfree.data.AbstractXYDataset
getX, getYMethods inherited from class org.jfree.data.AbstractSeriesDataset
seriesChangedMethods inherited from class org.jfree.data.AbstractDataset
addChangeListener, clone, getGroup, removeChangeListener, setGroup, validateObjectMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.data.Dataset
addChangeListener, getGroup, removeChangeListener, setGroupMethods inherited from interface org.jfree.data.IntervalXYDataset
getEndX, getEndY, getStartX, getStartY
-
Constructor Details
-
SubSeriesDataset
Creates a SubSeriesDataset using one or more series fromparent. The series to use are passed as an array of int.- Parameters:
parent- underlying datasetmap- int[] of series from parent to include in this Dataset
-
SubSeriesDataset
Creates a SubSeriesDataset using one series fromparent. The series to is passed as an int.- Parameters:
parent- underlying datasetseries- series from parent to include in this Dataset
-
-
Method Details
-
getHighValue
Returns the high-value for the specified series and item.Note: throws
ClassCastExceptionif the series if not from aHighLowDataset.- Specified by:
getHighValuein interfaceHighLowDataset- Parameters:
series- the index of the series of interest (zero-based).item- the index of the item of interest (zero-based).- Returns:
- the high-value for the specified series and item.
-
getHigh
public double getHigh(int series, int item)Returns the high-value (as a double primitive) for an item within a series.- Specified by:
getHighin interfaceHighLowDataset- Parameters:
series- the series (zero-based index).item- the item (zero-based index).- Returns:
- The high-value.
-
getLowValue
Returns the low-value for the specified series and item.Note: throws
ClassCastExceptionif the series if not from aHighLowDataset.- Specified by:
getLowValuein interfaceHighLowDataset- Parameters:
series- the index of the series of interest (zero-based).item- the index of the item of interest (zero-based).- Returns:
- the low-value for the specified series and item.
-
getLow
public double getLow(int series, int item)Returns the low-value (as a double primitive) for an item within a series.- Specified by:
getLowin interfaceHighLowDataset- Parameters:
series- the series (zero-based index).item- the item (zero-based index).- Returns:
- The low-value.
-
getOpenValue
Returns the open-value for the specified series and item.Note: throws
ClassCastExceptionif the series if not from aHighLowDataset.- Specified by:
getOpenValuein interfaceHighLowDataset- Parameters:
series- the index of the series of interest (zero-based).item- the index of the item of interest (zero-based).- Returns:
- the open-value for the specified series and item.
-
getOpen
public double getOpen(int series, int item)Returns the open-value (as a double primitive) for an item within a series.- Specified by:
getOpenin interfaceHighLowDataset- Parameters:
series- the series (zero-based index).item- the item (zero-based index).- Returns:
- The open-value.
-
getCloseValue
Returns the close-value for the specified series and item.Note: throws
ClassCastExceptionif the series if not from aHighLowDataset.- Specified by:
getCloseValuein interfaceHighLowDataset- Parameters:
series- the index of the series of interest (zero-based).item- the index of the item of interest (zero-based).- Returns:
- the close-value for the specified series and item.
-
getClose
public double getClose(int series, int item)Returns the close-value (as a double primitive) for an item within a series.- Specified by:
getClosein interfaceHighLowDataset- Parameters:
series- the series (zero-based index).item- the item (zero-based index).- Returns:
- The close-value.
-
getVolumeValue
Returns the volume.Note: throws
ClassCastExceptionif the series if not from aHighLowDataset.- Specified by:
getVolumeValuein interfaceHighLowDataset- Parameters:
series- the series (zero based index).item- the item (zero based index).- Returns:
- the volume.
-
getVolume
public double getVolume(int series, int item)Returns the volume-value (as a double primitive) for an item within a series.- Specified by:
getVolumein interfaceHighLowDataset- Parameters:
series- the series (zero-based index).item- the item (zero-based index).- Returns:
- The volume-value.
-
getXValue
Returns the X-value for the specified series and item.Note: throws
ClassCastExceptionif the series if not from aXYDataset. -
getYValue
Returns the Y-value for the specified series and item.Note: throws
ClassCastExceptionif the series if not from aXYDataset. -
getItemCount
public int getItemCount(int series)Returns the number of items in a series.Note: throws
ClassCastExceptionif the series if not from aXYDataset.- Specified by:
getItemCountin interfaceXYDataset- Parameters:
series- the index of the series of interest (zero-based).- Returns:
- the number of items in a series.
-
getSeriesCount
public int getSeriesCount()Returns the number of series in the dataset.- Specified by:
getSeriesCountin interfaceSeriesDataset- Specified by:
getSeriesCountin classAbstractSeriesDataset- Returns:
- the number of series in the dataset.
-
getSeriesName
Returns the name of a series.- Specified by:
getSeriesNamein interfaceSeriesDataset- Specified by:
getSeriesNamein classAbstractSeriesDataset- Parameters:
series- the series (zero-based index).- Returns:
- the name of a series.
-
getStartXValue
Returns the starting X value for the specified series and item.- Specified by:
getStartXValuein interfaceIntervalXYDataset- Parameters:
series- the index of the series of interest (zero-based).item- the index of the item of interest (zero-based).- Returns:
- the starting X value for the specified series and item.
-
getEndXValue
Returns the ending X value for the specified series and item.- Specified by:
getEndXValuein interfaceIntervalXYDataset- Parameters:
series- the index of the series of interest (zero-based).item- the index of the item of interest (zero-based).- Returns:
- the ending X value for the specified series and item.
-
getStartYValue
Returns the starting Y value for the specified series and item.- Specified by:
getStartYValuein interfaceIntervalXYDataset- Parameters:
series- the index of the series of interest (zero-based).item- the index of the item of interest (zero-based).- Returns:
- the starting Y value for the specified series and item.
-
getEndYValue
Returns the ending Y value for the specified series and item.- Specified by:
getEndYValuein interfaceIntervalXYDataset- Parameters:
series- the index of the series of interest (zero-based).item- the index of the item of interest (zero-based).- Returns:
- the ending Y value for the specified series and item.
-
getType
public int getType(int series, int item)Returns the type.- Specified by:
getTypein interfaceSignalsDataset- Parameters:
series- the series (zero based index).item- the item (zero based index).- Returns:
- the type.
-
getLevel
public double getLevel(int series, int item)Returns the level.- Specified by:
getLevelin interfaceSignalsDataset- Parameters:
series- the series (zero based index).item- the item (zero based index).- Returns:
- the level.
-
getParent
Returns the parent Dataset of this combination.- Specified by:
getParentin interfaceCombinationDataset- Returns:
- the parent Dataset of this combination.
-
getMap
public int[] getMap()Returns a map or indirect indexing form our series into parent's series.- Specified by:
getMapin interfaceCombinationDataset- Returns:
- a map or indirect indexing form our series into parent's series.
-