[ArrayDeque](http://docs.oracle.com/javase/7/docs/api/java/util/ArrayDeque.html) might be a better choice since it should be more efficient for iteration and adding/removing at the ends.