/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
class A {
private List<String> nonParsedData;
private List
<String[]> parsedData
;
A a = new A();
// init
a.nonParsedData = new ArrayList<>();
a.parsedData = new ArrayList<>();
// fill non parsed
a.nonParsedData.add("abcdefghijklmno");
a.nonParsedData.add("123456789012345");
a.nonParsedData.add("AZERTYUIOPQSDFG");
a.parseData();
a.fetchAndPrint();
}
{
//for reference, nonParsedData is ArrayList<String>
// while parsedData is ArrayList<String[]>
for (int x = 0; x < nonParsedData.size(); x++)
{
line = nonParsedData.get(x);
//filling the temporary container to place into the ArrayList of arrays
tempContainer[0] = line.substring(0,1); //Data piece 1
tempContainer[1] = line.substring(1,3); //Data piece 2
tempContainer[2] = line.substring(3,7); //Data piece 3
tempContainer[3] = line.substring(7,8); //Data piece 4
tempContainer[4] = line.substring(8,9); //Data piece 5
tempContainer[5] = line.substring(9,10); //Data piece 6
tempContainer[6] = line.substring(10,(line.length() - 1)); //Data piece 7
parsedData.add(tempContainer);
}
}
{
for(int x = 0; x < parsedData.size(); x++)
{
tempContainer = parsedData.get(x); //this should be assigning my stored array to
//the tempContainer array (I think)
//let's try deepToString (that didn't work)
//System.out.println((parsedData.get(x)).toString()); //just a debugging check
System.
out.
println(tempContainer
[0] + " " + tempContainer
[1] + " " + tempContainer[2] + " " + tempContainer[3] + " "
+ tempContainer[4] + " " + tempContainer[5] + " "
+ tempContainer[6] + " ");
}
}
}