static class LinkedTreeMap extends AbstractMap {
Map map;
new LinkedList list;
*() { map = new TreeMap; }
*(Map *map) {}
public B get(Object key) {
ret map.get(key);
}
public B put(A key, B value) {
if (!map.containsKey(key))
list.add(key);
return map.put(key, value);
}
public bool containsKey(O key) {
ret map.containsKey(key);
}
public Set> entrySet() {
ret map.entrySet();
}
}