Only

object Only

Easy way to run block codes only as many times as necessary.

Types

Builder
Link copied to clipboard
class Builder(name: String, times: Int)
Builder class for creating Only.

Functions

clearAllOnly
Link copied to clipboard
fun clearAllOnly()
clear all Only data from the preference.
clearOnly
Link copied to clipboard
fun clearOnly(name: String)
remove a Only data from the preference.
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
getMarking
Link copied to clipboard
fun getMarking(name: String): String?
gets Only marking data.
getOnBeforeDoneExecuted
Link copied to clipboard
fun getOnBeforeDoneExecuted(name: String): Boolean
get Only executed or not about onBeforeDone.
getOnlyTimes
Link copied to clipboard
fun getOnlyTimes(name: String): Int
get Only time from the preference.
hashCode
Link copied to clipboard
open fun hashCode(): Int
init
Link copied to clipboard
fun init(context: Context): Only
initialize the Only default properties.
isDebugMode
Link copied to clipboard
fun isDebugMode(): Boolean
check debug mode.
mark
Link copied to clipboard
fun mark(name: String, marking: Any?)
marks Only tag data.
onDo
Link copied to clipboard
fun onDo(name: String, times: Int, onDO: Runnable): Only
execute the onDo block only as many times as necessary.
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
execute the onDo block only as many times as necessary.
fun onDo(name: String, times: Int, onDo: Runnable, version: String = ""): Only
execute the onDo block only as many times as necessary.
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.
inline fun onDo(name: String, times: Int, crossinline onDo: (Int) -> Unit, version: String = ""): Only
execute the onDo block only as many times as necessary.
fun onDo(name: String, times: Int, onDo: Runnable, onDone: Runnable, version: String = ""): Only
execute the onDo block only as many times as necessary.
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.
fun onDo(name: String, times: Int, onDo: Runnable, onDone: Runnable, onLastDo: Runnable, onBeforeDone: Runnable): Only
execute the onDo block only as many times as necessary.
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.
fun onDo(name: String, times: Int, onDo: Runnable, onDone: Runnable, onLastDo: Runnable, onBeforeDone: Runnable, version: String = ""): Only
execute the onDo block only as many times as necessary with onLastDo and onBeforeDone.
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.
onDoOnce
Link copied to clipboard
fun onDoOnce(name: String, onDo: Runnable, onDone: Runnable, version: String = ""): Only
execute the onDo block only once.
inline fun onDoOnce(name: String, crossinline onDo: (Int) -> Unit, crossinline onDone: () -> Unit = {}, version: String = ""): Only
execute the onDo block only once.
fun onDoOnce(name: String, onDo: Runnable, onDone: Runnable, onLastDo: Runnable, onBeforeDone: Runnable, version: String = ""): Only
execute the onDo block only once with onLastDo and onBeforeDone.
inline fun onDoOnce(name: String, crossinline onDo: (Int) -> Unit, crossinline onDone: () -> Unit = {}, crossinline onLastDo: () -> Unit = {}, crossinline onBeforeDone: () -> Unit = {}, version: String = ""): Only
execute the onDo block only once with onLastDo and onBeforeDone.
onDoThrice
Link copied to clipboard
fun onDoThrice(name: String, onDo: Runnable, onDone: Runnable, version: String = ""): Only
execute the onDo block only thrice.
inline fun onDoThrice(name: String, crossinline onDo: (Int) -> Unit, crossinline onDone: () -> Unit = {}, version: String = ""): Only
execute the onDo block only thrice.
fun onDoThrice(name: String, onDo: Runnable, onDone: Runnable, onLastDo: Runnable, onBeforeDone: Runnable, version: String = ""): Only
execute the onDo block only thrice with onLastDo and onBeforeDone.
inline fun onDoThrice(name: String, crossinline onDo: (Int) -> Unit, crossinline onDone: () -> Unit = {}, crossinline onLastDo: () -> Unit = {}, crossinline onBeforeDone: () -> Unit = {}, version: String = ""): Only
execute the onDo block only thrice with onLastDo and onBeforeDone.
onDoTwice
Link copied to clipboard
fun onDoTwice(name: String, onDo: Runnable, onDone: Runnable, version: String = ""): Only
execute the onDo block only twice.
inline fun onDoTwice(name: String, crossinline onDo: (Int) -> Unit, crossinline onDone: () -> Unit = {}, version: String = ""): Only
execute the onDo block only twice.
fun onDoTwice(name: String, onDo: Runnable, onDone: Runnable, onLastDo: Runnable, onBeforeDone: Runnable, version: String = ""): Only
execute the onDo block only twice with onLastDo and onBeforeDone.
inline fun onDoTwice(name: String, crossinline onDo: (Int) -> Unit, crossinline onDone: () -> Unit = {}, crossinline onLastDo: () -> Unit = {}, crossinline onBeforeDone: () -> Unit = {}, version: String = ""): Only
execute the onDo block only twice with onLastDo and onBeforeDone.
onlyOnDoDebugMode
Link copied to clipboard
fun onlyOnDoDebugMode(ignore: Boolean): Only
check debugging mode.
setOnlyTimes
Link copied to clipboard
fun setOnlyTimes(name: String, time: Int)
set Only time from the preference.
toString
Link copied to clipboard
open fun toString(): String