|
||||||||||
| 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<Point<N>>
com.panayotis.gnuplot.dataset.PointDataSet<N>
public class PointDataSet<N extends Number>
Store data sets in a dynamic Generics ArrayList of Points. Prefer this object instead of ArrayDataSet if you plan to alter the points of this data sets afterwards its creation.
If your data are not only numerical, consider using a GenericDataSet instead.
GenericDataSet,
Serialized Form| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
PointDataSet()
Create an empty PointDataSet |
|
PointDataSet(Collection<? extends Point<N>> pts)
Create a new PointDataSet from a previous collection of Points |
|
PointDataSet(int initial)
Create an empty PointDataSet with a specified initial capacity |
|
| Method Summary | ||
|---|---|---|
void |
add(int index,
Point<N> point)
Add a new point to this DataSet at a specified position |
|
boolean |
add(Point<N> point)
Add a new point to this DataSet |
|
boolean |
addAll(Collection<? extends Point<N>> pts)
Add a collection of points to this DataSet |
|
boolean |
addAll(int index,
Collection<? extends Point<N>> 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 |
|
void |
addPoint(N... coords)
Add a new point to the data set, given the values for each dimension. |
|
static
|
constructDataSet(Class<N> objclass,
Object array)
This is a convinient method to transform a statically defined primitive array to PointDataSet object. |
|
int |
getDimensions()
Retrieve how many dimensions this dataset refers to. |
|
String |
getPointValue(int point,
int dimension)
Retrieve data information from a point. |
|
Point<N> |
set(int index,
Point<N> 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 PointDataSet()
public PointDataSet(int initial)
initial - The initial capacity of this PointDataSet
public PointDataSet(Collection<? extends Point<N>> pts)
throws NumberFormatException
pts - The collection of Points to use as a model
NumberFormatException - If the given collection is not in the correct format| Method Detail |
|---|
public boolean add(Point<N> point)
throws NumberFormatException
add in interface Collection<Point<N extends Number>>add in interface List<Point<N extends Number>>add in class ArrayList<Point<N extends Number>>point - The point to add to this DataSet
NumberFormatException - If the given collection is not in the correct format
public void add(int index,
Point<N> point)
throws NumberFormatException
add in interface List<Point<N extends Number>>add in class ArrayList<Point<N extends Number>>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 Point<N>> pts)
throws NumberFormatException
addAll in interface Collection<Point<N extends Number>>addAll in interface List<Point<N extends Number>>addAll in class ArrayList<Point<N extends Number>>pts - The points colelction
NumberFormatException - If the given collection is not in the correct format
public boolean addAll(int index,
Collection<? extends Point<N>> pts)
throws NumberFormatException
addAll in interface List<Point<N extends Number>>addAll in class ArrayList<Point<N extends Number>>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 Point<N> set(int index,
Point<N> point)
throws NumberFormatException
set in interface List<Point<N extends Number>>set in class ArrayList<Point<N extends Number>>index - The position of the point to be alteredpoint - The point to use
NumberFormatException - If the given collection is not in the correct formatpublic void addPoint(N... coords)
coords - a list of primitive data of the same type of this collection. Could also be boxed variables too.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 static final <N extends Number> PointDataSet<N> constructDataSet(Class<N> objclass,
Object array)
throws ArrayStoreException
objclass - The class of this PointDataSet. For example for Double
precision numbers, this parameter should be Double.classarray - The array containing the primitive data
ArrayStoreException - If some misconfiguration is performed on the provided array object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||