Split Java ArrayList by properties of contained Objects
- by tzippy
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.