|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfovis.utils.BasicFactory
infovis.column.ColumnFactory
public class ColumnFactory
Factory of Columns to create a new column based on its type name and density/sparsity.
| Nested Class Summary | |
|---|---|
static interface |
ColumnFactory.Creator
Column Creator for the Factory. |
static class |
ColumnFactory.DefaultCreator
Default implementation of Creator. |
| Field Summary | |
|---|---|
static int |
COLUMN_TYPE_DEFAULT
Constant for requesting a column by default. |
static int |
COLUMN_TYPE_DENSE
Constant for requesting a dense column. |
static int |
COLUMN_TYPE_SPARSE
Constant for requesting a sparse column. |
| Method Summary | |
|---|---|
void |
add(ColumnFactory.Creator c)
Adds a creator using its name. |
void |
add(String type,
ColumnFactory.Creator c)
Adds a new creator associated with a specified type name. |
void |
add(String type,
String columnClass,
String density)
Adds a new creator associated with a specified type name and density name. |
Column |
create(String typeName,
int type,
String name)
Create a Column given its type name and density type. |
Column |
create(String typeName,
String name)
Create a Column given its type name. |
static Column |
createColumn(String typeName,
int type,
String name)
Utility method to create a column from a type name using a specified name and sparsity/density specification. |
static Column |
createColumn(String typeName,
String name)
Utility method to create a column from a type name using a specified name. |
ColumnFactory.Creator |
getCreator(String typeName)
Returns a creator for the specified type name. |
ColumnFactory.Creator |
getCreator(String typeName,
int type)
Returns the creator for a specified type name and density type. |
static ColumnFactory |
getInstance()
Returns the current instance of this factory. |
String |
getTypeName(Column col)
Returns a registered type name for a specified column. |
Iterator |
iterator()
Returns an iterator over the type names maintained by the factory. |
boolean |
remove(ColumnFactory.Creator c)
Removes a creator from this factory. |
static void |
setInstance(ColumnFactory factory)
Sets the current instance of this factory. |
| Methods inherited from class infovis.utils.BasicFactory |
|---|
loadProperties |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int COLUMN_TYPE_DENSE
public static final int COLUMN_TYPE_SPARSE
public static final int COLUMN_TYPE_DEFAULT
| Method Detail |
|---|
public static ColumnFactory getInstance()
public static void setInstance(ColumnFactory factory)
factory - the new instance.
public static Column createColumn(String typeName,
String name)
Delegates the creation to the current instance.
typeName - the type namename - the column name
public static Column createColumn(String typeName,
int type,
String name)
Delegates the creation to the current instance.
typeName - the type nametype - density, either COLUMN_TYPE_DENSE
or COLUMN_TYPE_SPARSE.name - the column name
public Iterator iterator()
public void add(String type,
ColumnFactory.Creator c)
type - the type namec - the Creator
public void add(String type,
String columnClass,
String density)
type - the type namecolumnClass - the class of column to create for this type namedensity - a string "DENSE" or "SPARSE"public void add(ColumnFactory.Creator c)
c - the creatorpublic boolean remove(ColumnFactory.Creator c)
c - the creator
public ColumnFactory.Creator getCreator(String typeName,
int type)
typeName - the type nametype - the density
public ColumnFactory.Creator getCreator(String typeName)
typeName - the type name
public Column create(String typeName,
int type,
String name)
typeName - the type name of the columntype - the densityname - the column name
public Column create(String typeName,
String name)
typeName - the type name of the columnname - the column name
public String getTypeName(Column col)
col - the column
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||