|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<ArrayList<String>>
com.panayotis.gnuplot.dataset.GenericDataSet
public class GenericDataSet
Generic data class to store data. This class stores data as a list of Strings, not numbers. Still, the user can check if the data are valid, by using a specific DataParser for this object.
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 Form| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
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 |
|
| Method Summary | |
|---|---|
boolean |
add(ArrayList<String> point)
Add a new point to this DataSet |
void |
add(int index,
ArrayList<String> point)
Add a new point to this DataSet at a specified position |
boolean |
addAll(Collection<? extends ArrayList<String>> pts)
Add a collection of points to this DataSet |
boolean |
addAll(int index,
Collection<? extends ArrayList<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. |
String |
getPointValue(int point,
int dimension)
Retrieve data information from a point. |
ArrayList<String> |
set(int index,
ArrayList<String> point)
Replace the Point at the specified position with the provided one |
| Methods inherited from class java.util.ArrayList |
|---|
clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.panayotis.gnuplot.dataset.DataSet |
|---|
size |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
| Constructor Detail |
|---|
public GenericDataSet()
DoubleDataParserpublic GenericDataSet(boolean first_column_date)
first_column_date - Whether the first column is in date formatpublic GenericDataSet(DataParser parser)
parser - The DataParser to use| Method Detail |
|---|
public int getDimensions()
getDimensions in interface DataSetDataSet.getDimensions()
public String getPointValue(int point,
int dimension)
getPointValue in interface DataSetpoint - The point numberdimension - The point dimension (or "column") to request data from
DataSet.getPointValue(int,int)
public boolean add(ArrayList<String> point)
throws NumberFormatException
add in interface Collection<ArrayList<String>>add in interface List<ArrayList<String>>add in class ArrayList<ArrayList<String>>point - The point to add to this DataSet
NumberFormatException - If the given collection is not in the correct format
public void add(int index,
ArrayList<String> point)
throws NumberFormatException
add in interface List<ArrayList<String>>add in class ArrayList<ArrayList<String>>index - Where to add this pointpoint - The point to add to this DataSet
NumberFormatException - If the given collection is not in the correct format
public boolean addAll(Collection<? extends ArrayList<String>> pts)
throws NumberFormatException
addAll in interface Collection<ArrayList<String>>addAll in interface List<ArrayList<String>>addAll in class ArrayList<ArrayList<String>>pts - The points colelction
NumberFormatException - If the given collection is not in the correct format
public boolean addAll(int index,
Collection<? extends ArrayList<String>> pts)
throws NumberFormatException
addAll in interface List<ArrayList<String>>addAll in class ArrayList<ArrayList<String>>index - Where to start adding point data.pts - The point collection to add
NumberFormatException - If the given collection is not in the correct format
public ArrayList<String> set(int index,
ArrayList<String> point)
throws NumberFormatException,
ArrayIndexOutOfBoundsException
set in interface List<ArrayList<String>>set in class ArrayList<ArrayList<String>>index - The position of the point to be alteredpoint - The point to use
NumberFormatException - If the given collection is not in the correct format
ArrayIndexOutOfBoundsException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||