@@ -0,0 +1,593 @@
+package com.smartg.java.util;%0A%0Aimport java.util.Iterator;%0Aimport java.util.function.Function;%0A%0A/**%0A * Iterate and apply Function %22on the fly%22%0A * @author User%0A *%0A * @param %3CT%3E%0A * @param %3CE%3E%0A */%0Apublic class MappingIterator%3CT, E%3E implements Iterator%3CE%3E %7B%0A%0A%09private Function%3CT, E%3E mapper;%0A%09private Iterator%3CT%3E iterator;%0A%0A%09public MappingIterator(Function%3CT, E%3E mapper, Iterator%3CT%3E iterator) %7B%0A%09%09this.mapper = mapper;%0A%09%09this.iterator = iterator;%0A%09%7D%0A%0A%09@Override%0A%09public boolean hasNext() %7B%0A%09%09return iterator.hasNext();%0A%09%7D%0A%0A%09@Override%0A%09public E next() %7B%0A%09%09return mapper.apply(iterator.next());%0A%09%7D%0A%0A%7D%0A

Create MappingIterator.java