Not sure if this would be the right forum for this, but the search tool indicated people have asked programming questions here and not in the creative projects forum, since this isn't really a creative project, just need a little bit of help.
So, the last time I programmed in java was like 10 years ago and I'm currently making a plugin to work with a minecraft mod. I've run into these Java collection methods (List, ArrayList, Hashtable, etc) and normally, I'd simply go with an array, struct (if this was c/c++), or even a class for each entry and an array with the pointers to control them. My major issue is that the documentation is -horrible- simply horrible. The online tutorials are also extremely ugly and non-helpful everywhere I go. If this was php or C it would be done already. I cannot even find anything on java arrays being dynamic or not, everywhere I see them people initialize them and that's not something I want. Anyway, off to the issue at hand:
I have a data set I need to manipulate, it should have a non-static ID entry simply to be able to point at a specific entry via an ingame command, since the data itself can be very similar. Each entry itself will have different values for: string playername, time, int blockid, int quantity, int price, and things like that. I need to be able to find entries via any of the variables, be able to delete any entry and possibly resort it with new IDs. The id in this case would simply be an int variable that's assigned whenever the database is loaded, I wouldn't simply use the array identifiers since I have no idea how java collections behave in that matter when deleting/adding entries.
What I had in mind was making a Hashtable or one of those to point to a class with each element, like:
public Hashtable<int, Classname> dataBase = new Hashtable<int, Classname>();
But since I have no experience with these java collections, I'm not sure how feasible it would be to search for elements inside the 'Classname' such as a player name. The int there would work as the ID for each game session. Plus I'm not sure how deleting/inserting elements behave with these collections. Since I also have no decent documentation on java's arrays, that isn't very helpful either. I suppose I could do a:
Classname[] dataBase;
But I don't know if I need to initialize it with a set length or if I can leave it dynamic, how deleting elements would work, what packes would I need to import for what I want to do, and things like that.
Just to be clear, I'm not looking for programming tutorials, since I already know how to program, just have a few questions about this in java. If you can point to a decent reference page that has programming examples that would help. If you can give me programming examples for what I want to do, maybe with different methods, that would help even more.
Thanks in advance.