Yes, that is correct.
The idea is there, still figuring out how to do it.

On Feb 2, 12:12 pm, DanH <[email protected]> wrote:
> You have a bunch HashMaps of different people, and you want to sort by
> age?
>
> You need to spin through the list of HashMaps and extract age from
> each one, then insert the age and HashMap into, eg, a TreeMap, with
> age being the key.
>
> On Feb 1, 8:15 pm, Mystique <[email protected]> wrote:
>
>
>
>
>
>
>
> > Ok, I just read but unclear (java newbie) about this one:
>
> > ArrayList<HashMap<String,String>> list = new
> > ArrayList<HashMap<String,String>>();
>
> > // I have a loop collecting these value from a XML parser
> > HashMap<String,String> map = new HashMap<String,String>();
> > map.put("name",Tname);
> > map.put("age",Tage);
> > list.add(map);
>
> > So let say I have test data, I want to sort the age in the ArrayList
> > call "list":
> > mary, 12
> > john, 11
>
> > Any sample to look at?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to