V - Datatype of an entry's value.public class Table<V>
extends java.lang.Object
| Constructor and Description |
|---|
Table() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.String columnIndexValue,
java.lang.String rowIndexValue,
V entry)
Adds a value to the cell identified by the columnIndexValue and the rowIndexValue.
|
java.util.List<java.lang.String> |
getColumnsOfCSV() |
java.util.List<java.lang.String> |
getRowsOfCSV() |
void |
sortColumns(java.util.Comparator<? super java.lang.String> c)
Allows to sort the columns of the table.
|
void |
sortRows(java.util.Comparator<? super java.lang.String> c)
Allows to sort the rows of the table.
|
java.lang.String |
toCSV(java.lang.String standardValue)
Converts the table into CSV format.
|
java.lang.String |
toCSV(java.lang.String separator,
java.lang.String standardValue)
Converts the table into CSV format.
|
java.lang.String |
toLaTeX()
Converts the table to latex code, empty cells are filled with an empty string.
|
java.lang.String |
toLaTeX(java.lang.String missingEntry)
Converts the table to latex code, empty cells are filled with the provided missingEntry String.
|
public void add(java.lang.String columnIndexValue,
java.lang.String rowIndexValue,
V entry)
columnIndexValue - The name of the column.rowIndexValue - The name of the row.entry - The entry to add to the table's cell.public java.lang.String toLaTeX()
public java.lang.String toLaTeX(java.lang.String missingEntry)
missingEntry - Value of empty table cells.public java.lang.String toCSV(java.lang.String standardValue)
standardValue - Value to assign for non-existing entries.public java.lang.String toCSV(java.lang.String separator,
java.lang.String standardValue)
separator - The symbol to separate values in the CSV format.standardValue - Value to assign for non-existing entries.public java.util.List<java.lang.String> getColumnsOfCSV()
public java.util.List<java.lang.String> getRowsOfCSV()
public void sortColumns(java.util.Comparator<? super java.lang.String> c)
c - The comparator to use for sorting.public void sortRows(java.util.Comparator<? super java.lang.String> c)
c - The comparator to use for sorting.