So I have a Map defined as
Map<Integer, Object[]> data = new TreeMap<Integer, Object[]>();
and I am adding data as I loop through and read a text file. For most of the data, I'll add it and move on. However, there is data in the file that needs to applied back to an existing entry without deleting it or removing it's position. Example.
data.put(counter, new Object[] {ex1, ex2, ex3, ex4});
So, if I were to add an entry expecting to have data later on I would need to add (EDIT: it can be appended), is there way to keep the existing data and append new data? Example.
First,
data.put(counter, new Object[] {"testData1", "testData2", "testData3", "testData4"});
When I loop to data that needs to be added, I need to be able to add "testData5" to the end position while only knowing the counter's value when the data was originally added.
Is there a way to do this without deleting the existing data in that specific entry?
Edit: The data can be appended, changed example for this.