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
 void addLimitAttribute(int AttrNo)
           
 void dropLimitAttribute(int AttrNo)
           
 boolean getBoolean(int rowNumber)
          Returns the value of given row.
 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.
 boolean[] getLimitAttributes()
           
 java.lang.String getLimitAttributesAsString()
           
 long getLong(int rowNumber)
          Returns the value of given row.
 int getMaxClassSelected()
           
 double getMaxDouble()
          Returns the maximum value of attribute.
 double getMaxDoubleSelected()
           
 long getMaxLong()
          Returns the maximum value of attribute.
 long getMaxLongSelected()
           
 java.lang.String getMeasurement()
          Method returns the measurement of the column.
 int getMinClassSelected()
           
 double getMinDouble()
          Returns the minimum value of attribute.
 double getMinDoubleSelected()
           
 long getMinLong()
          Returns the minimum value of attribute.
 long getMinLongSelected()
           
 java.lang.String getName()
          Method returns the name of the column.
 int getNumberofClasses()
          Method returns the number of the class values.
 java.util.Vector getSelectionVector()
          Returns the selected values in a Vector.
 java.lang.String getSelectionVectorAsString()
          Returns the selected values as a String.
 java.lang.String getValueofClass(int classNo)
          Method returns the value of a class value.
 boolean hasLimitAttribute()
           
 void initializeClasses(int cCount)
          Method creates array for class values.
 void initLimitAttributes(int attrCount)
           
 boolean isSelected()
          Tells if something is selected from this column.
 boolean isSelectedValue(double value)
          Tells if the given value is included in the selected values.
 boolean isSelectedValue(int value)
          Tells if the given value is included in the selected values.
 boolean isSelectedValue(long value)
          Tells if the given value is included in the selected values.
 boolean removeColSelected(double min, double max)
          Removes selections from the given range.
 boolean removeColSelected(int min, int max)
          Removes selections from the given range.
 boolean removeColSelected(long min, long max)
          Removes selections from the given range.
 void setBoolean(int rowNumber, boolean value)
          Sets the value of attribute on given row.
 void setClass(int rowNumber, int value)
          Sets the value of attribute on given row.
 void setColSelected(boolean keepSelection)
          Sets the Column's selection flag and possibly clears the selected values.
 void setColSelected(double min, double max)
          Adds a new selection to this column.
 void setColSelected(int min, int max)
          Adds a new selection to this column.
 void setColSelected(long min, long max)
          Adds a new selection to this column.
 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, 3=boolean
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), 3 - boolean.
Returns:
The type of the column. 0 - long, 1 - double, 2 - class (int), 3 - boolean.

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.

setBoolean

public void setBoolean(int rowNumber,
                       boolean 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.

getBoolean

public boolean getBoolean(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).

setColSelected

public void setColSelected(boolean keepSelection)
Sets the Column's selection flag and possibly clears the selected values.
Parameters:
keepSelection - - False removes selections, true just sets the selected-flag.

setColSelected

public void setColSelected(long min,
                           long max)
Adds a new selection to this column.
Parameters:
min - - min value.
max - - max value.

setColSelected

public void setColSelected(double min,
                           double max)
Adds a new selection to this column.
Parameters:
min - - min value.
max - - max value.

setColSelected

public void setColSelected(int min,
                           int max)
Adds a new selection to this column.
Parameters:
min - - min value.
max - - max value.

removeColSelected

public boolean removeColSelected(long min,
                                 long max)
Removes selections from the given range.
Parameters:
min - - min value.
max - - max value.

removeColSelected

public boolean removeColSelected(double min,
                                 double max)
Removes selections from the given range.
Parameters:
min - - min value.
max - - max value.

removeColSelected

public boolean removeColSelected(int min,
                                 int max)
Removes selections from the given range.
Parameters:
min - - min value.
max - - max value.

isSelectedValue

public boolean isSelectedValue(long value)
Tells if the given value is included in the selected values.
Parameters:
value - - Value to be inspected.

isSelectedValue

public boolean isSelectedValue(double value)
Tells if the given value is included in the selected values.
Parameters:
value - - Value to be inspected.

isSelectedValue

public boolean isSelectedValue(int value)
Tells if the given value is included in the selected values.
Parameters:
value - - Value to be inspected.

isSelected

public boolean isSelected()
Tells if something is selected from this column.
Returns:
True if something is selected.

getSelectionVector

public java.util.Vector getSelectionVector()
Returns the selected values in a Vector.
Returns:
Selected values in a Vector.

getSelectionVectorAsString

public java.lang.String getSelectionVectorAsString()
Returns the selected values as a String.
Returns:
Selected values as a String.

getMinLongSelected

public long getMinLongSelected()

getMaxLongSelected

public long getMaxLongSelected()

getMinDoubleSelected

public double getMinDoubleSelected()

getMaxDoubleSelected

public double getMaxDoubleSelected()

getMinClassSelected

public int getMinClassSelected()

getMaxClassSelected

public int getMaxClassSelected()

initLimitAttributes

public void initLimitAttributes(int attrCount)

addLimitAttribute

public void addLimitAttribute(int AttrNo)

getLimitAttributes

public boolean[] getLimitAttributes()

getLimitAttributesAsString

public java.lang.String getLimitAttributesAsString()

dropLimitAttribute

public void dropLimitAttribute(int AttrNo)

hasLimitAttribute

public boolean hasLimitAttribute()