I am using Talend tJavaFlex component where there is start code(runs once in the beginning), main code(runs for every row), end code(runs once at end).
**In the start code(create an empty list):**
java.util.List sharedList=new java.util.ArrayList<>();
**In the main code(create HashMap for each row and add to list):**
Consider each row has fields: startId, endID, time, flag.
sharedList.add(new java.util.HashMap<String, String>("startId",row1.startId));
<I am not sure how to handle this part>
**In end code(expose the list to other components)**
System.out.print(sharedList.size());
Could you suggest how to create HashMap for each row and add to list.