Some Iterator and Generator classes for java 7 & 8