public class CSVHeaders
extends java.lang.Object
| Constructor and Description |
|---|
CSVHeaders(java.io.File filename,
boolean headers,
CSVFormat format)
Construct the object.
|
CSVHeaders(java.util.List<java.lang.String> inputHeadings)
Construct the object.
|
CSVHeaders(java.lang.String[] inputHeadings)
Construct the object.
|
| Modifier and Type | Method and Description |
|---|---|
int |
find(java.lang.String name)
Find the specified column.
|
java.lang.String |
getBaseHeader(int index)
Get the base header, strip any (...).
|
java.lang.String |
getHeader(int index)
Get the specified header.
|
java.util.List<java.lang.String> |
getHeaders() |
int |
getSlice(int currentIndex)
Get the timeslice for the specified index.
|
static int |
parseTimeSlice(java.lang.String name)
Parse a timeslice from a header such as (t-1).
|
int |
size() |
static java.lang.String |
tagColumn(java.lang.String name,
int part,
int timeSlice,
boolean multiPart)
Tag a column with part # and timeslice.
|
public CSVHeaders(java.io.File filename,
boolean headers,
CSVFormat format)
filename - The filename.headers - False if headers are not extended.format - The CSV format.public CSVHeaders(java.util.List<java.lang.String> inputHeadings)
inputHeadings - The input headings.public CSVHeaders(java.lang.String[] inputHeadings)
inputHeadings - The input headings.public static int parseTimeSlice(java.lang.String name)
name - The column name.public static java.lang.String tagColumn(java.lang.String name,
int part,
int timeSlice,
boolean multiPart)
name - The name of the column.part - The part #.timeSlice - The timeslice.multiPart - True if this is a multipart column.public int find(java.lang.String name)
name - The column name.public java.lang.String getBaseHeader(int index)
index - The index of the header.public java.lang.String getHeader(int index)
index - The index of the header to get.public java.util.List<java.lang.String> getHeaders()
public int getSlice(int currentIndex)
currentIndex - The index to get the time slice for.public int size()