java - ordered map implementation -


I'm looking for a map implementation that repeats in key-value pairs in the order in which they were added. For example,

  ordered the map map = // due to obvious reasons omitted :) orderMap.put (4, "d"); OrderMap.put (10, "y"); OrderMap.put (2, "b"); (Map entry entry: ordered map.entrySet ()) {System.out.println (entry.getKey () + "," + entry.getValue ()); }  

will always print

  4, d 10, y2, b  

I will use Java I am 5.0.

Thank you, Don

that


Comments