All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tea.set.DataSet

java.lang.Object
   |
   +----java.util.Observable
           |
           +----tea.set.DataSet

public class DataSet
extends Observable
DataSet is used to hold a set of data values. If a DataSet is numeric (default), it takes arrays or strings, and create either a Vector of Number, or a Vector of Vector of Number. If a DataSet is not numeric, it takes arrays of strings, and create either a Vector of Object (the type of Object depends on the data supplied), or a Vector of Vector of Object. It can be used to create the dataset for using with Graph.

See Also:
Graph

Constructor Index

 o DataSet(boolean)
Create an empty dataset.
 o DataSet(double[])
Create a dataset with the supplied double array.
 o DataSet(double[][])
Create a dataset with the supplied double array.
 o DataSet(int[])
Create a dataset with the supplied integer array.
 o DataSet(int[][])
Create a dataset with the supplied integer array.
 o DataSet(Object[])
Create a dataset with the supplied array.
 o DataSet(Object[][])
Create a dataset with the supplied array.
 o DataSet(String, String)
Create a dataset with the supplied string.
 o DataSet(String, String, String)
Create a dataset with the supplied string.
 o DataSet(Vector)
Create a dataset with the supplied vector.

Method Index

 o getData()
Get the dataset data as either one dimensional or two dimensional Vector (Vector of Vector) of Objects.
 o setData(double[])
Create a dataset with the supplied double array.
 o setData(double[][])
Create a dataset with the supplied double array.
 o setData(int[])
Create a dataset with the supplied integer array.
 o setData(int[][])
Create a dataset with the supplied integer array.
 o setData(Object[])
Create a dataset with the supplied array.
 o setData(Object[][])
Create a dataset with the supplied array.
 o setData(String, String)
Create a dataset with the supplied string.
 o setData(String, String, String)
Create a dataset with the supplied string.
 o setData(Vector)
Create a dataset with the supplied vector.

Constructors

 o DataSet
 public DataSet(boolean numeric)
Create an empty dataset.

 o DataSet
 public DataSet(Vector v)
Create a dataset with the supplied vector.

Parameters:
v - dataset value.
 o DataSet
 public DataSet(Object v[])
Create a dataset with the supplied array. If this is a numeric DataSet, the array should contain Number as elements. If an object is not Number, it will be parsed as double using Double.valueOf().

Parameters:
v - dataset value.
 o DataSet
 public DataSet(Object v[][])
Create a dataset with the supplied array. If this is a numeric DataSet, the array should contain Number as elements. If an object is not Number, it will be parsed as double using Double.valueOf().

Parameters:
v - dataset value.
 o DataSet
 public DataSet(int v[])
Create a dataset with the supplied integer array.

Parameters:
v - dataset value.
 o DataSet
 public DataSet(int v[][])
Create a dataset with the supplied integer array.

Parameters:
v - dataset value.
 o DataSet
 public DataSet(double v[])
Create a dataset with the supplied double array.

Parameters:
v - dataset value.
 o DataSet
 public DataSet(double v[][])
Create a dataset with the supplied double array.

Parameters:
v - dataset value.
 o DataSet
 public DataSet(String v,
                String delim)
Create a dataset with the supplied string. If the DataSet is numeric, the string should contain a delimited list of numbers.

Parameters:
v - delimited string of fields.
delim - delimiter.
 o DataSet
 public DataSet(String v,
                String rec_delim,
                String field_delim)
Create a dataset with the supplied string. If the DataSet is numeric, the string should contain a delimited list of numbers.

Parameters:
v - delimited string of fields.
rec_delim - record delimiter.
field_delim - fields(number) delimiter.

Methods

 o getData
 public Vector getData()
Get the dataset data as either one dimensional or two dimensional Vector (Vector of Vector) of Objects.

Returns:
DataSet data.
 o setData
 public DataSet setData(Vector v)
Create a dataset with the supplied vector.

Parameters:
v - dataset value.
Returns:
this dataset.
 o setData
 public DataSet setData(Object v[])
Create a dataset with the supplied array. If this is a numeric DataSet, the array should contain Number as elements. If an object is not Number, it will be parsed as double using Double.valueOf().

Parameters:
v - dataset value.
Returns:
this dataset.
 o setData
 public DataSet setData(Object v[][])
Create a dataset with the supplied array. If this is a numeric DataSet, the array should contain Number as elements. If an object is not Number, it will be parsed as double using Double.valueOf().

Parameters:
v - dataset value.
Returns:
this dataset.
 o setData
 public DataSet setData(int v[])
Create a dataset with the supplied integer array.

Parameters:
v - dataset value.
Returns:
this dataset.
 o setData
 public DataSet setData(int v[][])
Create a dataset with the supplied integer array.

Parameters:
v - dataset value.
Returns:
this dataset.
 o setData
 public DataSet setData(double v[])
Create a dataset with the supplied double array.

Parameters:
v - dataset value.
Returns:
this dataset.
 o setData
 public DataSet setData(double v[][])
Create a dataset with the supplied double array.

Parameters:
v - dataset value.
Returns:
this dataset.
 o setData
 public DataSet setData(String v,
                        String delim)
Create a dataset with the supplied string. If the DataSet is numeric, the string should contain a delimited list of numbers.

Parameters:
v - delimited string of fields.
delim - delimiter.
Returns:
this dataset.
 o setData
 public DataSet setData(String v,
                        String rec_delim,
                        String field_delim)
Create a dataset with the supplied string. If the DataSet is numeric, the string should contain a delimited list of numbers.

Parameters:
v - delimited string of fields.
rec_delim - record delimiter.
field_delim - fields(number) delimiter.
Returns:
this dataset.

All Packages  Class Hierarchy  This Package  Previous  Next  Index