abstract class CompositeClause<in S : ContractState, C : CommandData, in K : Any> : Clause<S, C, K>
Abstract supertype for clauses which compose other clauses together in some logical manner.
See Also
<init> |
CompositeClause() Abstract supertype for clauses which compose other clauses together in some logical manner. |
clauses |
abstract val clauses: List<Clause<S, C, K>> List of clauses under this composite clause |
requiredCommands |
open val requiredCommands: Set<Class<out CommandData>> Determine whether this clause runs or not |
getExecutionPath |
open fun getExecutionPath(commands: List<AuthenticatedObject<C>>): List<Clause<*, *, *>> Determine the subclauses which will be verified as a result of verifying this clause. |
matchedClauses |
abstract fun matchedClauses(commands: List<AuthenticatedObject<C>>): List<Clause<S, C, K>> Determine which clauses are matched by the supplied commands |
matches |
fun <C : CommandData> Clause<*, C, *>.matches(commands: List<AuthenticatedObject<C>>): Boolean Determine if the given list of commands matches the required commands for a clause to trigger. |
AllComposition |
class AllComposition<S : ContractState, C : CommandData, K : Any> : CompositeClause<S, C, K> Compose a number of clauses, such that all of the clauses must run for verification to pass. |
AnyComposition |
class AnyComposition<in S : ContractState, C : CommandData, in K : Any> : CompositeClause<S, C, K> Compose a number of clauses, such that any number of the clauses can run. |
FirstComposition |
class FirstComposition<S : ContractState, C : CommandData, K : Any> : CompositeClause<S, C, K> Compose a number of clauses, such that the first match is run, and it errors if none is run. |