I\'d like to have an object that implements both the Map and the List interfaces in Java. The idea is similar to the problem in this question: Java Ordered Map
I wan
As you noticed you cannot implement both List and Map on the same class. But for what you need that should also not be necessary. What you need is that the data can be accessed by both a Map and a List interface. A bit like accessing Map data as a set in entrySet() or as a Collection using Map.values().
In short, what you need is 2 views on the data, one view implementing a List and another view implementing Map.
If there is one view dominant (for example Map) then you could give your map implementation a method List getAsList() which presents the data as a List, backed by the data of the Map.
EDIT
The answer given by Paulo Guedes should serve you. There already is a Map implementation with your requirements. My answer is a bit more general, about presenting the same data using multiple incompatible interfaces where a simple Adapter is not enough.