|
||||||||||
| 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 java.lang.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(java.util.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(java.util.Collection<? extends Point<N>> pts)
Add a collection of points to this DataSet |
|
boolean |
addAll(int index,
java.util.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(java.lang.Class<N> objclass,
java.lang.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. |
|
java.lang.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(java.util.Collection<? extends Point<N>> pts)
throws java.lang.NumberFormatException
pts - The collection of Points to use as a model
java.lang.NumberFormatException - If the given collection is not in the correct format| Method Detail |
|---|
public boolean add(Point<N> point)
throws java.lang.NumberFormatException
add in interface java.util.Collection<Point<N extends java.lang.Number>>add in interface java.util.List<Point<N extends java.lang.Number>>add in class java.util.ArrayList<Point<N extends java.lang.Number>>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,
Point<N> point)
throws java.lang.NumberFormatException
add in interface java.util.List<Point<N extends java.lang.Number>>add in class java.util.ArrayList<Point<N extends java.lang.Number>>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 Point<N>> pts)
throws java.lang.NumberFormatException
addAll in interface java.util.Collection<Point<N extends java.lang.Number>>addAll in interface java.util.List<Point<N extends java.lang.Number>>addAll in class java.util.ArrayList<Point<N extends java.lang.Number>>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 Point<N>> pts)
throws java.lang.NumberFormatException
addAll in interface java.util.List<Point<N extends java.lang.Number>>addAll in class java.util.ArrayList<Point<N extends java.lang.Number>>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 Point<N> set(int index,
Point<N> point)
throws java.lang.NumberFormatException
set in interface java.util.List<Point<N extends java.lang.Number>>set in class java.util.ArrayList<Point<N extends java.lang.Number>>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 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 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 static final <N extends java.lang.Number> PointDataSet<N> constructDataSet(java.lang.Class<N> objclass,
java.lang.Object array)
throws java.lang.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
java.lang.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 | |||||||||