Invariant

interface Invariant<ID, V : Value<ID, V, S>, S : State<ID, V, S>>

Represents an invariant that must hold true for a value in a particular state.

Parameters

V

The type of value being validated

S

The type of state that this invariant applies to

Functions

Link copied to clipboard
abstract fun validate(value: V): Result<V>

Validates that the given value meets this invariant.