Class RepeatedProc<X>

  • Type Parameters:
    X - Type of input
    All Implemented Interfaces:
    Proc<X>

    public final class RepeatedProc<X>
    extends Object
    implements Proc<X>
    Proc that runs repeatedly for a number of times.
    Since:
    0.49.2
    • Constructor Detail

      • RepeatedProc

        public RepeatedProc​(Proc<? super X> prc,
                            int count)
        Ctor.

        If count is equal or less than zero exec(Object) will return an exception.

        Parameters:
        prc - Proc to repeat.
        count - How many times.
    • Method Detail

      • exec

        public void exec​(X input)
                  throws Exception
        Description copied from interface: Proc
        Execute it.
        Specified by:
        exec in interface Proc<X>
        Parameters:
        input - The argument
        Throws:
        Exception - If fails