View Javadoc

1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.lang.java.symboltable;
5   
6   import java.util.Iterator;
7   
8   import net.sourceforge.pmd.util.UnaryFunction;
9   
10  public class Applier {
11  
12      public static <E> void apply(UnaryFunction<E> f, Iterator<? extends E> i) {
13          while (i.hasNext()) {
14              f.applyTo(i.next());
15          }
16      }
17  }