onDo

fun onDo(name: String, times: Int, onDO: Runnable): Only
inline fun onDo(name: String, times: Int, crossinline onDo: (Int) -> Unit): Only

execute the onDo block only as many times as necessary.

fun onDo(name: String, times: Int, onDo: Runnable, onDone: Runnable): Only
inline fun onDo(name: String, times: Int, crossinline onDo: (Int) -> Unit, crossinline onDone: () -> Unit): Only

execute the onDo block only as many times as necessary. if unnecessary, unCatch block will be executed.

fun onDo(name: String, times: Int, onDo: Runnable, version: String = ""): Only
inline fun onDo(name: String, times: Int, crossinline onDo: (Int) -> Unit, version: String = ""): Only

execute the onDo block only as many times as necessary. if the version is different from the old version, Only times will be initialized 0.

fun onDo(name: String, times: Int, onDo: Runnable, onDone: Runnable, version: String = ""): Only
inline fun onDo(name: String, times: Int, crossinline onDo: (Int) -> Unit, crossinline onDone: () -> Unit, version: String = ""): Only

execute the onDo block only as many times as necessary. if unnecessary, unCatch block will be executed. if the version is different from the old version, Only times will be initialized 0.

fun onDo(name: String, times: Int, onDo: Runnable, onDone: Runnable, onLastDo: Runnable, onBeforeDone: Runnable): Only
inline fun onDo(name: String, times: Int, crossinline onDo: (Int) -> Unit, crossinline onDone: () -> Unit, crossinline onLastDo: () -> Unit = {}, crossinline onBeforeDone: () -> Unit = {}): Only

execute the onDo block only as many times as necessary. if unnecessary, unCatch block will be executed. if the version is different from the old version, Only times will be initialized 0. onLastDo block will be run only once after the last run time of the onDo. onBeforeDone block will be run only once before the onDone block will be run.

fun onDo(name: String, times: Int, onDo: Runnable, onDone: Runnable, onLastDo: Runnable, onBeforeDone: Runnable, version: String = ""): Only
inline fun onDo(name: String, times: Int, crossinline onDo: (Int) -> Unit, crossinline onDone: () -> Unit, crossinline onLastDo: () -> Unit = {}, crossinline onBeforeDone: () -> Unit = {}, version: String = ""): Only

execute the onDo block only as many times as necessary with onLastDo and onBeforeDone. if unnecessary, unCatch block will be executed. if the version is different from the old version, Only times will be initialized 0.