Switch for loop to forEach method.

Signed-off-by: Kouhei Maeda <mkouhei@palmtb.net>