Package com.persequor

Class IteratorUtils

java.lang.Object
com.persequor.IteratorUtils

public class IteratorUtils extends Object
  • Constructor Details

    • IteratorUtils

      public IteratorUtils()
  • Method Details

    • each

      public static <T, E extends Exception> void each(Iterable<T> iterable, ThrowingConsumer<T,E> consumer) throws E
      Do action for each element
      Type Parameters:
      T - type of element to process
      E - type of exception thrown by consumer
      Parameters:
      iterable - element to process
      consumer - action to perform with each element
      Throws:
      E - exception thrown by the provided consumer