In Alice, there are two commands that deal directly with lists: For All In Order, and For All Together. These are located at the bottom of the method editor. Drag "For All Together" into the method editor, and then select the world.CollisionObjects list. Now the if/else statement should be placed inside the For All Together. The if/else statement should now be changed to look like the following
pictureMethod.jpg
I also put the entire thing in a loop, because you probably want it to test all the time.
I hope this helped!