I've got Treasure
objects in a TreasureCollectionDB
class.
The TreasureCollectionDB
class has a Map<Long, Treasure>
(long being an id generated by the TreasureCollectionDB
) called treasures
and a second data collection/list (available treasures).
The thing I need the other Collection
or List
to do is hold Treasures which I will add/remove through JSP pages. The Treasures in this list should be unique, but sorted alphabetically (if there's no data holder that does this by it self, I will write a sort method).
Anyone know what data holder I should use? Answers on the internet are confusing me as to which is most suitable.