// LinkedHashMap remembers the order in which the items are added to the list,
// which preserves the sorting coming from the db
Map<String, List<TopSellerDO>> topSellersByCategoryMap = new LinkedHashMap<String, List<TopSellerDO>>();
Tuesday, November 30, 2010
LinkedHashMap
If you have a HashMap in a particular order and want to make sure it gets maintained, use LinkedHashMap.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment