public class GenericDataSet extends java.util.ArrayList<java.util.ArrayList<java.lang.String>> implements DataSet
In this dataset one can use any type of data, while in PointDataSet the data are stricted to numerical data only. Thus, data such as dates can be used.
DataParser
,
PointDataSet
,
Serialized FormConstructor and Description |
---|
GenericDataSet()
Create a new instance of GenericDataSet, with the default DataParser
(DoubleDataParser)
|
GenericDataSet(boolean first_column_date)
Create a new instance of GenericDataSet, with the default DataParser
(DoubleDataParser), and the information that the first column is in date
format.
|
GenericDataSet(DataParser parser)
Create a new instance of GenericDataSet, with a given DataParser
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.util.ArrayList<java.lang.String> point)
Add a new point to this DataSet
|
void |
add(int index,
java.util.ArrayList<java.lang.String> point)
Add a new point to this DataSet at a specified position
|
boolean |
addAll(java.util.Collection<? extends java.util.ArrayList<java.lang.String>> pts)
Add a collection of points to this DataSet
|
boolean |
addAll(int index,
java.util.Collection<? extends java.util.ArrayList<java.lang.String>> pts)
Add a collection of points to this DataSet starting at a specified
position if there are data at the specified position, these will be
shifted
|
int |
getDimensions()
Retrieve how many dimensions this dataset refers to.
|
java.lang.String |
getPointValue(int point,
int dimension)
Retrieve data information from a point.
|
java.util.ArrayList<java.lang.String> |
set(int index,
java.util.ArrayList<java.lang.String> point)
Replace the Point at the specified position with the provided one
|
clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, size, subList, toArray, toArray, trimToSize
public GenericDataSet()
DoubleDataParser
public GenericDataSet(boolean first_column_date)
first_column_date
- Whether the first column is in date formatpublic GenericDataSet(DataParser parser)
parser
- The DataParser to usepublic int getDimensions()
getDimensions
in interface DataSet
DataSet.getDimensions()
public java.lang.String getPointValue(int point, int dimension)
getPointValue
in interface DataSet
point
- The point numberdimension
- The point dimension (or "column") to request data fromDataSet.getPointValue(int,int)
public boolean add(java.util.ArrayList<java.lang.String> point) throws java.lang.NumberFormatException
add
in interface java.util.Collection<java.util.ArrayList<java.lang.String>>
add
in interface java.util.List<java.util.ArrayList<java.lang.String>>
add
in class java.util.ArrayList<java.util.ArrayList<java.lang.String>>
point
- The point to add to this DataSetjava.lang.NumberFormatException
- If the given collection is not in
the correct formatpublic void add(int index, java.util.ArrayList<java.lang.String> point) throws java.lang.NumberFormatException
add
in interface java.util.List<java.util.ArrayList<java.lang.String>>
add
in class java.util.ArrayList<java.util.ArrayList<java.lang.String>>
index
- Where to add this pointpoint
- The point to add to this DataSetjava.lang.NumberFormatException
- If the given collection is not in
the correct formatpublic boolean addAll(java.util.Collection<? extends java.util.ArrayList<java.lang.String>> pts) throws java.lang.NumberFormatException
addAll
in interface java.util.Collection<java.util.ArrayList<java.lang.String>>
addAll
in interface java.util.List<java.util.ArrayList<java.lang.String>>
addAll
in class java.util.ArrayList<java.util.ArrayList<java.lang.String>>
pts
- The points colelctionjava.lang.NumberFormatException
- If the given collection is not in
the correct formatpublic boolean addAll(int index, java.util.Collection<? extends java.util.ArrayList<java.lang.String>> pts) throws java.lang.NumberFormatException
addAll
in interface java.util.List<java.util.ArrayList<java.lang.String>>
addAll
in class java.util.ArrayList<java.util.ArrayList<java.lang.String>>
index
- Where to start adding point data.pts
- The point collection to addjava.lang.NumberFormatException
- If the given collection is not in
the correct formatpublic java.util.ArrayList<java.lang.String> set(int index, java.util.ArrayList<java.lang.String> point) throws java.lang.NumberFormatException, java.lang.ArrayIndexOutOfBoundsException
set
in interface java.util.List<java.util.ArrayList<java.lang.String>>
set
in class java.util.ArrayList<java.util.ArrayList<java.lang.String>>
index
- The position of the point to be alteredpoint
- The point to usejava.lang.NumberFormatException
- If the given collection is not in
the correct formatjava.lang.ArrayIndexOutOfBoundsException