Skip to content

Commit

Permalink
fix method signature
Browse files Browse the repository at this point in the history
  • Loading branch information
KochTobi committed Sep 24, 2024
1 parent 8071b4c commit c6bff06
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,18 @@ public Iterator<Row> iterator() {
return rows.iterator();
}

public List<String> getRow(int rowIndex) {
public Row getRow(int rowIndex) {
if (rowIndex < 0 || rowIndex >= rows.size()) {
throw new IndexOutOfBoundsException(
"Row index out of bounds: %s but size is %s".formatted(rowIndex, rows.size()));
}
return rows.get(rowIndex).values;
return rows.get(rowIndex);
}

public record Row(List<String> values) {

public Row(List<String> values) {
this.values = List.copyOf(values);
}

}

}

0 comments on commit c6bff06

Please sign in to comment.