prefuse.data.column
Class ColumnFactory

java.lang.Object
  extended by prefuse.data.column.ColumnFactory

public class ColumnFactory
extends java.lang.Object

Factory class for generating appropriate column instances. Used by Tables to generate their columns.

Author:
jeffrey heer

Constructor Summary
ColumnFactory()
           
 
Method Summary
static Column getColumn(java.lang.Class type)
          Get a new column of the given type.
static Column getColumn(java.lang.Class type, int nrows)
          Get a new column of the given type.
static Column getColumn(java.lang.Class type, int nrows, int nnz, java.lang.Object defaultValue)
          Get a new column of the given type.
static Column getColumn(java.lang.Class type, int nrows, java.lang.Object defaultValue)
          Get a new column of the given type.
static Column getColumn(Table t, Expression expr)
          Get a new column based on the given expression.
static Column getConstantColumn(java.lang.Class type, java.lang.Object dflt)
          Get a new column of a constant value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnFactory

public ColumnFactory()
Method Detail

getColumn

public static final Column getColumn(java.lang.Class type)
Get a new column of the given type.

Parameters:
type - the column data type
Returns:
the new column

getColumn

public static final Column getColumn(java.lang.Class type,
                                     int nrows)
Get a new column of the given type.

Parameters:
type - the column data type
nrows - the number of rows to include in the column
Returns:
the new column

getColumn

public static final Column getColumn(java.lang.Class type,
                                     int nrows,
                                     java.lang.Object defaultValue)
Get a new column of the given type.

Parameters:
type - the column data type
nrows - the number of rows to include in the column
defaultValue - the default value for the column
Returns:
the new column

getColumn

public static final Column getColumn(java.lang.Class type,
                                     int nrows,
                                     int nnz,
                                     java.lang.Object defaultValue)
Get a new column of the given type.

Parameters:
type - the column data type
nrows - the number of rows to include in the column
nnz - the number of expected non-zero entries (NOTE: currently this value is not being used)
defaultValue - the default value for the column
Returns:
the new column

getColumn

public static final Column getColumn(Table t,
                                     Expression expr)
Get a new column based on the given expression.

Parameters:
t - the table the column should be added to
expr - the expression that should provide the column values
Returns:
the new column

getConstantColumn

public static final Column getConstantColumn(java.lang.Class type,
                                             java.lang.Object dflt)
Get a new column of a constant value.

Parameters:
type - the column data type
dflt - the default constant value for the column
Returns:
the new column


Copyright © 2007 Regents of the University of California