plaidshirt
8 years agoContributor
Get multiple values with Groovy script
I have a text file with lines of data. I would like to get multiple lines(values) from this text file in each iteration.
I have script, which uses one file in each iteration.
I store elements in a list.
List<String[]> myList = new ArrayList<String[]>();
while ((strLine = bufferedReader.readLine()) != null) {
myList.add(strLine.split(","));
}
I get one file in each iteration from my list.
for(int i=0; i < myList.size(); i++) {
element = myList[i];
}
I am not sure, how could I handle multiple values dinamically in each iteration. Should I create properties for each data?