public abstract class BasicTypeHeader<T> extends Object implements Header<T>
| Constructor and Description |
|---|
BasicTypeHeader() |
| Modifier and Type | Method and Description |
|---|---|
BasicTypeHeader |
add(T name,
Class<? extends DataFrameColumn> colClass,
Class<? extends Comparable> type)
Adds a new header entry based on column name, column class and column value type.
|
BasicTypeHeader |
add(T headerName,
DataFrameColumn<?,?> column)
Adds a new data frame column to this header
|
void |
clear()
Clears this header
|
boolean |
contains(T name)
Returns true if the header contains a column with the input name
|
abstract BasicTypeHeader |
copy()
Creates a copy of this header.
|
boolean |
equals(Object other)
Returns true if the other header is compatible with this header.
|
T |
get(int index)
Returns the column header name at a specific index.
|
Class<? extends DataFrameColumn> |
getColumnType(int index)
Returns the column class for a column index
|
Class<? extends DataFrameColumn> |
getColumnType(T name)
Returns the column class for an input column name
|
int |
getIndex(T name)
Returns the column index of a specific column name.
|
Class<? extends Comparable> |
getType(int index)
Returns the column value type for a column index
|
Class<? extends Comparable> |
getType(T name)
Returns the column value type for an input column name
|
Iterator<T> |
iterator()
Returns an iterator over the column names in this header.
|
void |
remove(T name)
Removes a column from this header
|
void |
rename(T oldName,
T newName)
Renames a column
|
int |
size()
Returns the number of entries(columns) in this header
|
String |
toString()
Returns a string representation of this header
|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic int size()
Headerpublic BasicTypeHeader add(T headerName, DataFrameColumn<?,?> column)
column - new data frame columnpublic BasicTypeHeader add(T name, Class<? extends DataFrameColumn> colClass, Class<? extends Comparable> type)
name - column namecolClass - column classtype - column value typepublic void remove(T name)
name - column namepublic void rename(T oldName, T newName)
oldName - old namenewName - new namepublic boolean equals(Object other)
public Class<? extends DataFrameColumn> getColumnType(T name)
name - input column namepublic Class<? extends DataFrameColumn> getColumnType(int index)
index - column indexpublic Class<? extends Comparable> getType(T name)
name - input column namepublic Class<? extends Comparable> getType(int index)
index - column indexpublic T get(int index)
DataFrameRuntimeException if the index is out of bounds.public boolean contains(T name)
public void clear()
public int getIndex(T name)
DataFrameRuntimeException if the column header name is not foundpublic abstract BasicTypeHeader copy()
public String toString()
Copyright © 2017. All rights reserved.