Wednesday, August 21, 2013

LinkedHashMap and TreeMap

LinkedHashMap
This implementation differs from HashMap in that it maintains a doubly-linked list running through all of its entries.
This linked list defines the iteration ordering, which is normally the order in which keys were inserted into the map (insertion-order).
It's used to compare/merge the currency pair list for FX
While TreeMap
A Red-Black tree based NavigableMap implementation. The map is sorted according to the natural ordering of its keys, or by a
Comparator provided at map creation time, depending on which constructor is used.

No comments:

Post a Comment