Or to avoid bringing in another container, just use a switch statement, and return an ArrayList based on the control variable.