it.unibz.algorithms.types
Class Row

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

public class Row
extends java.lang.Object

This class represents both the dataset attributes and the data content of our database. The number of attributes are obviously equal to the number of elements contained in a single dataset row.


Field Summary
(package private)  java.util.ArrayList<java.lang.String> row
           
 
Constructor Summary
Row()
          This constructor initializes the arraylist named row
Row(java.lang.String s)
          This constructor receives a string straight from the arff file.
 
Method Summary
 void addRowAttribute(java.lang.String o)
          This method simply adds data into the arraylist
 int getSize()
          Returns the number of element contained into the arraylist
 java.lang.String getValue(int i)
          This method returns an indexed value contained into the arraylist
 java.lang.String printRow()
          This method returns a formatted form of the arraylyst content
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

row

java.util.ArrayList<java.lang.String> row
Constructor Detail

Row

public Row()
This constructor initializes the arraylist named row


Row

public Row(java.lang.String s)
This constructor receives a string straight from the arff file. Since all data are separated by a comma, we split the string a save the data into the arraylist.

Parameters:
s - String that follows arff files structure
Method Detail

getSize

public int getSize()
Returns the number of element contained into the arraylist

Returns:
Integer the size of the arraylist

addRowAttribute

public void addRowAttribute(java.lang.String o)
This method simply adds data into the arraylist

Parameters:
o - String dataset value

getValue

public java.lang.String getValue(int i)
This method returns an indexed value contained into the arraylist

Parameters:
i - Index
Returns:
String the indexed value

printRow

public java.lang.String printRow()
This method returns a formatted form of the arraylyst content

Returns:
String The content of the arraylist