Builder

class Builder(name: String, times: Int)

Builder class for creating Only.

Constructors

Builder
Link copied to clipboard
fun Builder(name: String, times: Int = 1)

Functions

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open fun hashCode(): Int
mark
Link copied to clipboard
fun mark(marking: Any?): Only.Builder
marks to the Only data.
onBeforeDone
Link copied to clipboard
fun onBeforeDone(runnable: Runnable): Only.Builder
executes only once the onBeforeDone block after before executing onDone block.
fun onBeforeDone(onBeforeDone: () -> Unit): Only.Builder
executes only once the onBeforeDone block after before executing onDone block.
onDo
Link copied to clipboard
fun onDo(runnable: Runnable): Only.Builder
executes the onDo block only as many times as necessary.
fun onDo(onDo: (Int) -> Unit): Only.Builder
executes the onDo block only as many times as necessary.
onDone
Link copied to clipboard
fun onDone(runnable: Runnable): Only.Builder
executes the onDone block after executing x+1 times onDo block.
fun onDone(onDone: () -> Unit): Only.Builder
executes the onDone block after executing x+1 times onDo block.
onLastDo
Link copied to clipboard
fun onLastDo(runnable: Runnable): Only.Builder
executes only once the onLastDo block after finishing x times onDo block.
fun onLastDo(onLastDo: () -> Unit): Only.Builder
executes only once the onLastDo block after finishing x times onDo block.
run
Link copied to clipboard
fun run()
toString
Link copied to clipboard
open fun toString(): String
version
Link copied to clipboard
fun version(version: String): Only.Builder
changes version and clear the executed time history.

Properties

marking
Link copied to clipboard
var marking: Any? = null
name
Link copied to clipboard
val name: String
onBeforeDone
Link copied to clipboard
var onBeforeDone: () -> Unit
onDo
Link copied to clipboard
var onDo: (Int) -> Unit
onDone
Link copied to clipboard
var onDone: () -> Unit
onLastDo
Link copied to clipboard
var onLastDo: () -> Unit
times
Link copied to clipboard
val times: Int = 1
version
Link copied to clipboard
var version: String