Which data structure to choose ?
I need some help about choosing the right data structure for my program.
I have a file with a few thoushand of lines, representing properties of characters (1 line = 1 character). There is the unicode, the UTF-8 code, and other stuff on the same line.
Now, I need to display these chars one at a time in my GUI and would like to be able, from one char displayed, to display the one before or the one after (by clicking on a forward arrow, or backward arrow). Also, I would like to jump randomly from one to another one.
Which data structure should I use ? ArrayList ? Linkedlist ? Or a map like hashmap maybe ? I really don't know which one is the best.
I thought maybe that linkedlist could be good since I want to get the "previous" and the "next" from a given position.
What's your opinion ?
Thank you very much people!