zam_block_architecture library Null safety

Classes

BasicSanitizer<DATA extends Object>
Block<OUPUT extends Object>
A block is a piece of code, wrapped inside an execute Function just like a command. It is a alias for Command so that it can parent concepts like logic, rule, sanitizer, etc.
BlockResponse<VALUE extends Object>
An optional wrapper for Block Output which can be used for chaining.
CompositeBlock<OUTPUT extends Object>
Provides a build method to compose blocks.
CompositeRule<FACT extends Object, OUTPUT extends Object>
A rule with a build method. The build method lets you compose.
ContainerBlock<OUTPUT extends Object>
ContainerRule<FACT extends Object, VALUE extends Object>
ContainerSanitizer<DATA extends Object>
CustomRule<FACT extends Object, VALUE extends Object>
DynamicMultiChildBlock<OUTPUT extends Object>
FirstErrorlessBlock<OUTPUT extends Object>
Runs the first child that runs without an error.
FromValueCustomRule<FACT extends Object, VALUE extends Object>
FromValueRule<FACT extends Object, VALUE extends Object>
Succeeds when value is not null.
ListRule<FACT extends Object, VALUE extends Object>
Container for a list of rules.
ListSanitizer<DATA extends Object>
Logic<OUTPUT extends Object>
A block that performs some logic and provides output.
MultiChildBlock<OUTPUT extends Object>
A block that can contain a list of children.
ParameterizedLogic<INPUT extends Object, OUTPUT extends Object>
A logic that accepts an input.
Rule<FACT extends Object, VALUE extends Object>
A block that accepts a fact, validates it and returns a RuleResponse which provides many useful information like [...]
RuleResponse<VALUE extends Object>
It is returned when a rule is executed. [...]
RunOneBlock<OUTPUT extends Object>
Runs only the first block that satisfies the condition.
Sanitizer<DATA extends Object>
Takes a data, sanitizes it, returns it back.
SatisfyAllRule<FACT extends Object, VALUE extends Object>
Succeeds only when all its children succeed.
SatisfyAnyRule<FACT extends Object, VALUE extends Object>
Succeeds only if at least one of its children succeed.
SatisfyAnyRuleResponse<VALUE extends Object>
Contains the rule that succeeded in addition to other data.
SimpleRule<FACT extends Object, VALUE extends Object>
Succeeds when the given condition is true.
SingleChildBlock<OUTPUT extends Object>
A block that can hold a child block.
TransformableCompositeBlock<OUTPUT extends Object, INTER_OUTPUT extends Object>
TransformableCompositeRule<FACT extends Object, OUTPUT extends Object, INTER_OUTPUT extends Object>
ValidationRule<FACT extends Object, VALUE extends Object, EXCEPTION extends NamedException>

Mixins

DetailedExceptionThrowingAbility<FACT extends Object, VALUE extends Object, EXCEPTION_DETAILS extends Object>
A mixin that allows us to throw exceptions with details of when the rule fails.
ExceptionThrowingAbility<FACT extends Object, VALUE extends Object>
A mixin that allows us to throw exceptions when the rule fails.

Typedefs

BlockBuilder<OUTPUT extends Object> = Block<OUTPUT> Function()
A builder that returns a block.
ParameterizedBlockBuilder<OUTPUT extends Object, INPUT extends Object> = Block<OUTPUT> Function(INPUT input)
A parameterized builder that returns a block.
SanitizerBuilder<DATA extends Object> = Sanitizer<DATA> Function(DATA data)