public class SampleMetadata extends Object
Describe samples structure by holding sample column names and theirs matching indexes.
| Constructor and Description |
|---|
SampleMetadata(char separator,
String... columns)
Builds metadata from separator character and a list of column names
|
SampleMetadata(SampleSaveConfiguration saveConfig)
Construct SampleMetaData from
SampleSaveConfiguration. |
| Modifier and Type | Method and Description |
|---|---|
int |
ensureIndexOf(String col)
Returns the index of the column with the specified name.
|
int |
getColumnCount() |
String |
getColumnName(int i)
Gets the name of the ith column in this metadata
|
String |
getColumnName(Integer i)
Gets the name of the ith column in this metadata
|
char |
getSeparator() |
int |
indexOf(String col)
Returns the index of the column with the specified name.
|
String |
toString() |
public SampleMetadata(char separator,
String... columns)
separator - The character used for column separationcolumns - The list of columns names (must not be null)public SampleMetadata(SampleSaveConfiguration saveConfig)
SampleSaveConfiguration.saveConfig - config from which metadata gets extracted (must not be
null)public char getSeparator()
public int getColumnCount()
public String getColumnName(int i)
i - The index of the column for which the name is requested (zero
based)IndexOutOfBoundsException - If the requested column does not exist (< 0 or >
getColumnCount())public String getColumnName(Integer i)
i - The index of the column for which the name is requested (zero
based)IndexOutOfBoundsException - If the requested columln does not exist (< 0 or >
getColumnCount())public int indexOf(String col)
col - the column name for which the index is requestedpublic int ensureIndexOf(String col)
col - the column name for which the index is requestedSampleException - when the column with the specified name is not foundCopyright © 1998-2022 Apache Software Foundation. All Rights Reserved.