This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static String[][] convertToMatrix(List<Tdata> dataList, String[] titleRow) throws IllegalArgumentException { | |
if (dataList.isEmpty()) { | |
throw new IllegalArgumentException("Data list cannot be empty."); | |
} | |
String[][] matrix = new String[dataList.size() + 1][titleRow.length]; | |
System.arraycopy(titleRow, 0, matrix[0], 0, titleRow.length); | |
for (int i = 0; i < dataList.size(); i++) { | |
Tdata data = dataList.get(i); |