--- /dev/null
+/**\r
+ * Copyright (C) 2009 - 2012 SC 4ViewSoft SRL\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.achartengine.model;\r
+\r
+import java.io.Serializable;\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+/**\r
+ * A series that includes 0 to many XYSeries.\r
+ */\r
+public class XYMultipleSeriesDataset implements Serializable {\r
+ /** The included series. */\r
+ private List<XYSeries> mSeries = new ArrayList<XYSeries>();\r
+\r
+ /**\r
+ * Adds a new XY series to the list.\r
+ * \r
+ * @param series the XY series to ass\r
+ */\r
+ public synchronized void addSeries(XYSeries series) {\r
+ mSeries.add(series);\r
+ }\r
+\r
+ /**\r
+ * Adds a new XY series to the list.\r
+ * \r
+ * @param index the index in the series list\r
+ * @param series the XY series to ass\r
+ */\r
+ public synchronized void addSeries(int index, XYSeries series) {\r
+ mSeries.add(index, series);\r
+ }\r
+\r
+ /**\r
+ * Removes the XY series from the list.\r
+ * \r
+ * @param index the index in the series list of the series to remove\r
+ */\r
+ public synchronized void removeSeries(int index) {\r
+ mSeries.remove(index);\r
+ }\r
+\r
+ /**\r
+ * Removes the XY series from the list.\r
+ * \r
+ * @param series the XY series to be removed\r
+ */\r
+ public synchronized void removeSeries(XYSeries series) {\r
+ mSeries.remove(series);\r
+ }\r
+\r
+ /**\r
+ * Returns the XY series at the specified index.\r
+ * \r
+ * @param index the index\r
+ * @return the XY series at the index\r
+ */\r
+ public synchronized XYSeries getSeriesAt(int index) {\r
+ return mSeries.get(index);\r
+ }\r
+\r
+ /**\r
+ * Returns the XY series count.\r
+ * \r
+ * @return the XY series count\r
+ */\r
+ public synchronized int getSeriesCount() {\r
+ return mSeries.size();\r
+ }\r
+\r
+ /**\r
+ * Returns an array of the XY series.\r
+ * \r
+ * @return the XY series array\r
+ */\r
+ public synchronized XYSeries[] getSeries() {\r
+ return mSeries.toArray(new XYSeries[0]);\r
+ }\r
+\r
+}\r