I have an array of arrays and every time I have a new array made available, I want to add it to the back of the array. However, once the array of arrays reaches 30 elements, I want the oldest array to be discarded and the newest one to be added. I cant seem to figure this out. Below is an example of what I'm talking about in attempt to clarify.
int[30][] jagged;
int[] updatingDataFeed;
//updatingDataFeed is different at different times and updating the jagged array can
//occur in an event handler that fires whenever the new data is ready
*This is within the event handler
jagged[0] = updatingDataFeed
I cant figure out what to do once you completely fill the 30 elements of jagged with updatingDataFeed arrays. When updatingDataFeed has a new element for the 31st time, I want jagged to look like:
jagged[0] = updatingDataFeed31
jagged[1] = updatingDataFeed2
jagged[2] = updatingDataFeed3
...
jagged[28] = updatingDataFeed29
jagged[29] = updatingDataFeed30