// Deques also support iteration through [type]Procedure interfaces.
// The apply() method will be called once for each element in the deque.
// Iteration from head to tail
deque.forEach(new IntProcedure()
{
public void apply(int value)
{
System.out.println(value);
}