I have a generic Map which is defined thus
Map<Integer, Book> bookCollection
The Integer is the book ID and the Book is obviously a Book object. The Book object has a member called publicationYear.
How do I sort the Map so that its Book objects are in order by the Book's publicationYear member. So, if I iterate through the sorted map, the oldest book appears first up to the newest book.
At the moment, the Map is randomly sorted.