01: /**
02: * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
03: */package net.sourceforge.pmd.util;
04:
05: import java.util.Iterator;
06:
07: public class Applier {
08:
09: public static <E> void apply(UnaryFunction<E> f,
10: Iterator<? extends E> i) {
11: while (i.hasNext()) {
12: f.applyTo(i.next());
13: }
14: }
15: }
|