doc / ch.tutteli.atrium.logic.creating.transformers / FeatureExtractorBuilder / RepresentationInCaseOfFailureStep

RepresentationInCaseOfFailureStep

interface RepresentationInCaseOfFailureStep<T> (source)

Step which allows to to define the representation which shall be used in case the extraction cannot be performed.

Parameters

T - the type of the current subject.

Properties

container

abstract val container: AssertionContainer<T>

The previously specified assertion container from which we are going to extract the feature.

description

abstract val description: Translatable

The previously specified description which describes the kind of feature extraction.

Functions

withRepresentationForFailure

open fun withRepresentationForFailure(representationProvider: () -> Any?): FeatureExtractorBuilder.FeatureExtractionStep<T>

Uses the given representationProvider, by turning it into a LazyRepresentation, to get the representation which will be used in case the extraction cannot be performed.

abstract fun withRepresentationForFailure(representation: Any): FeatureExtractorBuilder.FeatureExtractionStep<T>

Uses the given representation in case the extraction cannot be performed.

Companion Object Functions

invoke

operator fun <T> invoke(container: AssertionContainer<T>, description: Translatable): FeatureExtractorBuilder.RepresentationInCaseOfFailureStep<T>

Creates a RepresentationInCaseOfFailureStep in the context of the FeatureExtractorBuilder.