Class Column

java.lang.Object
  |
  +--Column

public class Column
extends java.lang.Object

Column implements one column in tabular data. It constains the data, name, measurement, index and class values of column.


Constructor Summary
Column(int attrType, int rowCnt)
          Constructor creates array for data of the column.
 
Method Summary
 int getClass(int rowNumber)
          Returns the value of given row.
 int getColumnType()
          Method returns the type of the column.
 double getDouble(int rowNumber)
          Returns the value of given row.
 Index getIndex(int attrNo)
          Method returns index on the column.
 long getLong(int rowNumber)
          Returns the value of given row.
 double getMaxDouble()
          Returns the maximum value of attribute.
 long getMaxLong()
          Returns the maximum value of attribute.
 java.lang.String getMeasurement()
          Method returns the measurement of the column.
 double getMinDouble()
          Returns the minimum value of attribute.
 long getMinLong()
          Returns the minimum value of attribute.
 java.lang.String getName()
          Method returns the name of the column.
 int getNumberofClasses()
          Method returns the number of the class values.
 java.lang.String getValueofClass(int classNo)
          Method returns the value of a class value.
 void initializeClasses(int cCount)
          Method creates array for class values.
 void setClass(int rowNumber, int value)
          Sets the value of attribute on given row.
 void setDouble(int rowNumber, double value)
          Sets the value of attribute on given row.
 void setLong(int rowNumber, long value)
          Sets the value of attribute on given row.
 void setMeasurement(java.lang.String value)
          Method sets the measurement of the column.
 void setName(java.lang.String value)
          Method sets the name of the column.
 void setValueofClass(int classNo, java.lang.String value)
          Method is used to setting the value of a class value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Column

public Column(int attrType,
              int rowCnt)
Constructor creates array for data of the column.
Parameters:
attrType - - Attribute type 0= long, 1=double, 2=class
rowCnt - - The number of datarows.
Method Detail

getIndex

public Index getIndex(int attrNo)
Method returns index on the column. It creates it if needed.
Parameters:
attrNo - - The number of current attribute (column).
Returns:
Method returns index of the column.

initializeClasses

public void initializeClasses(int cCount)
Method creates array for class values.
Parameters:
cCount - - The number of class values.

getNumberofClasses

public int getNumberofClasses()
Method returns the number of the class values.
Returns:
The number of class values.

setValueofClass

public void setValueofClass(int classNo,
                            java.lang.String value)
Method is used to setting the value of a class value.
Parameters:
classNo - - The number of the class value.
value - - The corresponding text.

getValueofClass

public java.lang.String getValueofClass(int classNo)
Method returns the value of a class value.
Parameters:
classNo - - The number of the class value.
Returns:
The value (string) of given classvalue.

setName

public void setName(java.lang.String value)
Method sets the name of the column.
Parameters:
value - - The name of the column.

getName

public java.lang.String getName()
Method returns the name of the column.
Returns:
The name of the column.

setMeasurement

public void setMeasurement(java.lang.String value)
Method sets the measurement of the column.
Parameters:
value - - The name of the measurement of the column.

getMeasurement

public java.lang.String getMeasurement()
Method returns the measurement of the column.
Returns:
The name of the measurement of the column.

getColumnType

public int getColumnType()
Method returns the type of the column. 0 - long, 1 - double, 2 - class (int).
Returns:
The type of the column. 0 - long, 1 - double, 2 - class (int).

setLong

public void setLong(int rowNumber,
                    long value)
Sets the value of attribute on given row.
Parameters:
rowNumber - - The number of the row value is added.
value - - The value to be added.

setDouble

public void setDouble(int rowNumber,
                      double value)
Sets the value of attribute on given row.
Parameters:
rowNumber - - The number of the row value is added.
value - - The value to be added.

setClass

public void setClass(int rowNumber,
                     int value)
Sets the value of attribute on given row.
Parameters:
rowNumber - - The number of the row value is added.
value - - The value to be added.

getLong

public long getLong(int rowNumber)
Returns the value of given row.
Parameters:
rowNumber - - The number of the row value is added.
Returns:
The value of given row.

getDouble

public double getDouble(int rowNumber)
Returns the value of given row.
Parameters:
rowNumber - - The number of the row value is added.
Returns:
The value of given row.

getClass

public int getClass(int rowNumber)
Returns the value of given row.
Parameters:
rowNumber - - The number of the row value is added.
Returns:
The value of given row.

getMinLong

public long getMinLong()
Returns the minimum value of attribute.
Returns:
The minimum value of attribute (column).

getMaxLong

public long getMaxLong()
Returns the maximum value of attribute.
Returns:
The maximum value of attribute (column).

getMinDouble

public double getMinDouble()
Returns the minimum value of attribute.
Returns:
The minimum value of attribute (column).

getMaxDouble

public double getMaxDouble()
Returns the maximum value of attribute.
Returns:
The maximum value of attribute (column).