Updated to use spiffy Java 7 syntactical sugar.