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