infovis.column
Class CategoricalColumn

java.lang.Object
  extended by infovis.utils.ChangeManager
      extended by infovis.column.AbstractColumn
          extended by infovis.column.BasicColumn
              extended by infovis.column.LiteralColumn
                  extended by infovis.column.IntColumn
                      extended by infovis.column.CategoricalColumn
All Implemented Interfaces:
IntComparator, Column, NumberColumn, Metadata, Constants, RowComparator, Serializable

public class CategoricalColumn
extends IntColumn

Specialization of an IntColumn storing categorical values.

Version:
$Revision: 1.20 $
Author:
Jean-Daniel Fekete
See Also:
Serialized Form
InfoVis factory arguments:
ColumnFactory "categorical" DENSE, ColumnFactory "cat" DENSE

Field Summary
 
Fields inherited from class infovis.column.AbstractColumn
MODIFIED_ALL, MODIFIED_NONE
 
Fields inherited from interface infovis.metadata.Constants
CONTRIBUTOR, COVERAGE, CREATOR, DATE, DESCRITION, FORMAT, IDENTIFIER, LANGUAGE, PUBLISHER, RELATION, RIGHTS, SOURCE, SUBJECT, TITLE, TYPE
 
Constructor Summary
CategoricalColumn(String name)
          Constructor for CategoricalColumn.
CategoricalColumn(String name, int reserve, Map map)
          Constructor for CategoricalColumn.
 
Method Summary
static IntColumn findColumn(Table t, String name)
          Returns a column as a IntColumn from a table, creating it if needed.
static IntColumn getColumn(Table t, int index)
          Returns a column as a IntColumn from an Table.
 
Methods inherited from class infovis.column.IntColumn
add, addExtend, capacity, clear, ensureCapacity, fill, format, format, get, getColumn, getDoubleAt, getFloatAt, getIntAt, getLongAt, getMax, getMin, getValueAt, getValueClass, getValueReference, parse, round, set, setDoubleAt, setExtend, setIntAt, setLongAt, setSize, setValueAt, size, sort, stableSort, toArray, toArray
 
Methods inherited from class infovis.column.LiteralColumn
compare, compareValues, getDoubleMax, getDoubleMin, getNumberColumn, hasUndefinedValue, isValueUndefined, setFloatAt, setValueUndefined, trimUndefined
 
Methods inherited from class infovis.column.BasicColumn
addValue, addValueOrNull, firstValidRow, getClientProperty, getFormat, getMaxIndex, getMetadata, getMinIndex, getName, isEmpty, isInternal, iterator, lastValidRow, setFormat, setName, setValueOrNullAt, toString
 
Methods inherited from class infovis.column.AbstractColumn
addChangeListener, computeValueMap, computeValueMap, equalObj, equals, getLastModifiedRow
 
Methods inherited from class infovis.utils.ChangeManager
disableNotify, enableNotify, getModCount, removeChangeListener
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface infovis.Column
addChangeListener, addValue, addValueOrNull, disableNotify, enableNotify, getFormat, getMaxIndex, getMinIndex, getName, isEmpty, isInternal, iterator, removeChangeListener, setFormat, setName, setValueOrNullAt
 
Methods inherited from interface infovis.Metadata
getClientProperty, getMetadata
 
Methods inherited from interface cern.colt.function.IntComparator
equals
 

Constructor Detail

CategoricalColumn

public CategoricalColumn(String name)
Constructor for CategoricalColumn.

Parameters:
name - the column name

CategoricalColumn

public CategoricalColumn(String name,
                         int reserve,
                         Map map)
Constructor for CategoricalColumn.

Parameters:
name - the Column name.
reserve - the initial reserved size.
map - the initial category map.
Method Detail

getColumn

public static IntColumn getColumn(Table t,
                                  int index)
Returns a column as a IntColumn from an Table.

Parameters:
t - the Table
index - index in the DefaultTable
Returns:
a IntColumn or null if no such column exists or the column is not a IntColumn.

findColumn

public static IntColumn findColumn(Table t,
                                   String name)
Returns a column as a IntColumn from a table, creating it if needed.

Parameters:
t - the Table
name - the column name.
Returns:
a column as a IntColumn from a table,


Copyright © 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.