doc / ch.tutteli.atrium.domain.creating.any.typetransformation / AnyTypeTransformation / Creator

Creator

interface Creator<S : Any, T : Any> (source)

Represents the final step of a sophisticated type transformation assertion builder which creates the Assertion as such.

Parameters

S - The type of AssertionPlant.subject.

T - The target type to which AssertionPlant.subject should have been transformed to.

Functions

create

abstract fun create(parameterObject: ParameterObject<S, T>, canBeTransformed: (S) -> Boolean, transform: (S) -> T, failureHandler: FailureHandler<S, T>): Unit

Creates the type transformation Assertion and ads it to the given ParameterObject.subjectPlant and delegates to the given failureHandler if the transformation fails.