|
||||||||||
| 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<java.util.ArrayList<java.lang.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(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 |
| 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 java.lang.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(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 DataSet
java.lang.NumberFormatException - If the given collection is not in the correct format
public 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 DataSet
java.lang.NumberFormatException - If the given collection is not in the correct format
public 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 colelction
java.lang.NumberFormatException - If the given collection is not in the correct format
public 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 add
java.lang.NumberFormatException - If the given collection is not in the correct format
public 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 use
java.lang.NumberFormatException - If the given collection is not in the correct format
java.lang.ArrayIndexOutOfBoundsException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||