infovis.column
Class ObjectColumn

java.lang.Object
  extended by infovis.utils.ChangeManager
      extended by infovis.column.AbstractColumn
          extended by infovis.column.BasicColumn
              extended by infovis.column.BasicObjectColumn
                  extended by infovis.column.ObjectColumn
All Implemented Interfaces:
IntComparator, Column, Metadata, Constants, RowComparator, Serializable

public class ObjectColumn
extends BasicObjectColumn

A Column of Strings.

Version:
$Revision: 1.37 $
Author:
fekete
See Also:
Serialized Form
InfoVis factory arguments:
ColumnFactory "object" 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
ObjectColumn(String name)
          Creates a new StringColumn object.
ObjectColumn(String name, int reserve)
          Creates a new ObjectColumn object.
 
Method Summary
 Object definedValue()
          Returns the instance of a value defined with the right type for this column.
static ObjectColumn findColumn(Table t, String name)
          Returns a column as a ObjectColumn from a table, creating it if needed.
 Object get(int index)
          Returns the Object at the specified index or null.
static ObjectColumn getColumn(Table t, int index)
          Returns a column as a ObjectColumn from an Table.
static ObjectColumn getColumn(Table t, String name)
          Returns a column as a ObjectColumn from a Table.
 void set(int index, Object element)
          Replaces the element at the specified position in this column with the specified element.
 
Methods inherited from class infovis.column.BasicObjectColumn
add, capacity, clear, compare, compare, compareValues, ensureCapacity, fill, format, getObjectAt, getOrder, getValueAt, getValueClass, getValueReference, hasUndefinedValue, indexOf, isValueUndefined, parse, remove, remove, setExtend, setObjectAt, setOrder, setSize, setValueAt, setValueUndefined, size
 
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
disableNotify, enableNotify, removeChangeListener
 

Constructor Detail

ObjectColumn

public ObjectColumn(String name)
Creates a new StringColumn object.

Parameters:
name - the column name.

ObjectColumn

public ObjectColumn(String name,
                    int reserve)
Creates a new ObjectColumn object.

Parameters:
name - the column name.
reserve - the initial capacity.
Method Detail

get

public Object get(int index)
Returns the Object at the specified index or null.

Parameters:
index - the index
Returns:
the Object at the specified index or null.

set

public final void set(int index,
                      Object element)
Replaces the element at the specified position in this column with the specified element.

Parameters:
index - index of element to replace.
element - element to be stored at the specified position.

getColumn

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

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

getColumn

public static ObjectColumn getColumn(Table t,
                                     String name)
Returns a column as a ObjectColumn from a Table.

Parameters:
t - the Table
name - the column name.
Returns:
a ObjectColumn or null if no such column exists or the column is not a ObjectColumn.

findColumn

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

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

definedValue

public Object definedValue()
Returns the instance of a value defined with the right type for this column.

Specified by:
definedValue in class BasicObjectColumn
Returns:
the instance of a value defined with the right type for this column.


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