io.cucumber.stepexpression.PickleTableConverter Maven / Gradle / Ivy
package io.cucumber.stepexpression;
import gherkin.pickles.PickleCell;
import gherkin.pickles.PickleRow;
import gherkin.pickles.PickleTable;
import java.util.ArrayList;
import java.util.List;
class PickleTableConverter {
static List> toTable(PickleTable pickleTable) {
List> table = new ArrayList>();
for (PickleRow pickleRow : pickleTable.getRows()) {
List row = new ArrayList();
for (PickleCell pickleCell : pickleRow.getCells()) {
row.add(pickleCell.getValue());
}
table.add(row);
}
return table;
}
}