it.unibz.algorithms.types
Class DataSet

java.lang.Object
  extended by it.unibz.algorithms.types.DataSet

public class DataSet
extends java.lang.Object

An abstract representation of an arff file. This class represents the content of a dataset. It contains the dataset name, the attributes names and a list of values.


Field Summary
private  Row attributes
           
private  java.util.ArrayList<Row> data
           
private  java.lang.String name
           
private  int skippedamount
           
 
Constructor Summary
DataSet()
          The constructor that initialize to null all class attributes
 
Method Summary
 Row getAttributes()
          It returns the attribute names
 java.util.ArrayList<Row> getData()
          This method returns the data contained into the dataset
 java.lang.String getName()
          This method returns the dataset name
 int getSkippedamount()
          Returns the amount of skipped items
 void incSkippedamount()
          Increments the number of skipped items
 java.lang.String print()
          This method gives a verbose version of the dataset content USED ONLY FOT TESTING
 void setAttributes(java.lang.String s)
          This method extract from a string the attribute name
 void setData(java.util.ArrayList<Row> data)
          This is the setter for the dataset content
 void setName(java.lang.String s)
          Setter for the dataset name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private java.lang.String name

attributes

private Row attributes

data

private java.util.ArrayList<Row> data

skippedamount

private int skippedamount
Constructor Detail

DataSet

public DataSet()
The constructor that initialize to null all class attributes

Method Detail

getSkippedamount

public int getSkippedamount()
Returns the amount of skipped items


incSkippedamount

public void incSkippedamount()
Increments the number of skipped items


setName

public void setName(java.lang.String s)
Setter for the dataset name

Parameters:
s - dataset name

setAttributes

public void setAttributes(java.lang.String s)
This method extract from a string the attribute name

Parameters:
s - retrieved from an arff file

setData

public void setData(java.util.ArrayList<Row> data)
This is the setter for the dataset content

Parameters:
data - a list of row objects

getAttributes

public Row getAttributes()
It returns the attribute names

Returns:
an object of type Row

getData

public java.util.ArrayList<Row> getData()
This method returns the data contained into the dataset

Returns:
a list of row objects

getName

public java.lang.String getName()
This method returns the dataset name

Returns:
dataset name

print

public java.lang.String print()
This method gives a verbose version of the dataset content USED ONLY FOT TESTING

Returns:
the dataset content