Basically, I have an arraylist declared like :
private ArrayList<HashMap<String, String>> songsList =
new ArrayList<HashMap<String, String>>();
now what I want to do is that for each key I want to give two value fields. Can it be done??
Secondly I want to sort the key-value pair according to the value pair. So how can it be achieved?
That’s a lot of
Stringobjects. Have you considered encapsulating your data structure using anObject, rather than a complex collection of strings? For example, assuming your map key is a song:Then, create your list of songs:
Then sort them: