public class MojoFrameMeta
extends java.lang.Object
implements java.io.Serializable
Container for meta data of a MojoFrame. This immutable class is used as a template for constructing MojoFrames in addition to providing names to the columns of an existing MojoFrame.
| Constructor and Description |
|---|
MojoFrameMeta(java.lang.String[] columnNames,
MojoColumn.Type[] columnTypes)
Construct a MojoFrameMeta instance with the given column names and types.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(java.lang.String columnName)
Checks if there exists meta data for a column with a particular name
|
int |
getColumnIndex(java.lang.String columnName)
Get the index of a column with the name
columnName |
java.lang.String |
getColumnName(int index)
Get the name of a column at a particular index
|
java.lang.String[] |
getColumnNames() |
protected java.util.Map<java.lang.String,java.lang.Integer> |
getColumnNamesMap() |
MojoColumn.Type |
getColumnType(int index)
Get the type of a column at a particular index
|
MojoColumn.Type |
getColumnType(java.lang.String columnName)
Get the type of a column with the name
columnName |
MojoColumn.Type[] |
getColumnTypes() |
static MojoFrameMeta |
getEmpty()
Make a MojoFrameMeta instance with no columns
|
int |
size()
Get the number of columns in this instance
|
public MojoFrameMeta(java.lang.String[] columnNames,
MojoColumn.Type[] columnTypes)
Construct a MojoFrameMeta instance with the given column names and types. The length of the two array arguments must be equal.
columnNames - The names of the columnscolumnTypes - The types of the columnspublic int getColumnIndex(java.lang.String columnName)
Get the index of a column with the name columnName
columnName - The name of the columnpublic java.lang.String getColumnName(int index)
Get the name of a column at a particular index
index - The index of the columnpublic MojoColumn.Type getColumnType(int index)
Get the type of a column at a particular index
index - The index of a columnpublic MojoColumn.Type getColumnType(java.lang.String columnName)
Get the type of a column with the name columnName
columnName - The name of the columnpublic boolean contains(java.lang.String columnName)
Checks if there exists meta data for a column with a particular name
columnName - The name of the columnpublic int size()
Get the number of columns in this instance
protected java.util.Map<java.lang.String,java.lang.Integer> getColumnNamesMap()
public java.lang.String[] getColumnNames()
public MojoColumn.Type[] getColumnTypes()
public static MojoFrameMeta getEmpty()
Make a MojoFrameMeta instance with no columns