checkpoint-core-abstraction / com.natigbabayev.checkpoint.core / Checkpoint

Checkpoint

class Checkpoint<INPUT> : DefaultRule<INPUT>

Child of DefaultRule which accepts list of DefaultRule. When Checkpoint.canPass is invoked, function will go through all of the passed rules and invoke DefaultRule.canPass of each rule until first item that cannot pass. Create instance of class using Checkpoint.Builder or checkpoint dsl.

Types

Builder

class Builder<INPUT>

Properties

callback

Callback which is used by Rule.invokeCallback when Rule.isValid returns false

val callback: Callback<INPUT>?

Functions

isValid

Function used to define whether a condition is satisfied with given input. Typically, this function should be invoked from Rule.canPass.

fun isValid(input: INPUT): Boolean