Added example code, now using Java 7 for Javadoc.