Split Java ArrayList by properties of contained Objects
Posted
by tzippy
on Stack Overflow
See other posts from Stack Overflow
or by tzippy
Published on 2010-05-27T12:21:49Z
Indexed on
2010/05/27
12:31 UTC
Read the original article
Hit count: 154
I have an ArrayList
containing Objects that have a date value.
Now I want to manage to create a new ArrayList
for each year that contains all the Objects from the main ArrayList
that have the same year in their date Value.
So all Objects from 2010 go in one List, all from 1999 in another.
© Stack Overflow or respective owner