Package io.github.repeat
Class RepeatTemplate
- java.lang.Object
-
- io.github.repeat.RepeatTemplate
-
- All Implemented Interfaces:
RepeatOperations
public class RepeatTemplate extends Object implements RepeatOperations
Repeats RepeatCallbacks a defined amount of times
-
-
Constructor Summary
Constructors Constructor Description RepeatTemplate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T,E extends Throwable>
List<T>repeat(RepeatCallback<T,E> repeatCallback, int times)repats RepeatCallback a defined amount of times and returns the results.
-
-
-
Method Detail
-
repeat
public <T,E extends Throwable> List<T> repeat(RepeatCallback<T,E> repeatCallback, int times) throws E extends Throwable
Description copied from interface:RepeatOperationsrepats RepeatCallback a defined amount of times and returns the results.- Specified by:
repeatin interfaceRepeatOperations- Type Parameters:
T- return type of repeatCallbackE- exceptions for repeatCallback- Parameters:
repeatCallback- method to executetimes- how many times to execute repeatCallback- Returns:
- a List of values from RepeatCallback
- Throws:
E- an error if any errors are thrown in RepeatCallbackE extends Throwable
-
-