Class Batch<T>

  • All Implemented Interfaces:
    FragileProcedure<java.lang.Iterable<? extends T>,​java.lang.RuntimeException>, Procedure<java.lang.Iterable<? extends T>>

    public final class Batch<T>
    extends java.lang.Object
    implements Procedure<java.lang.Iterable<? extends T>>
    A Procedure, which processes the elements of an Iterable using another Procedure.

    Example

    
     new Batch(System.out::println).process(new Seq<>("one", "two", "three"));
     
    Calls the Function System.out.println(String) with each of the three Strings.
    • Constructor Summary

      Constructors 
      Constructor Description
      Batch​(Procedure<? super T> delegate)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void process​(java.lang.Iterable<? extends T> argument)
      Executes the procedure with the given argument.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Batch

        public Batch​(Procedure<? super T> delegate)
    • Method Detail

      • process

        public void process​(java.lang.Iterable<? extends T> argument)
        Description copied from interface: Procedure
        Executes the procedure with the given argument.
        Specified by:
        process in interface FragileProcedure<java.lang.Iterable<? extends T>,​java.lang.RuntimeException>
        Specified by:
        process in interface Procedure<T>