doc / ch.tutteli.atrium.domain.builders.creating.changers / FeatureExtractorBuilder / OptionsChooser

OptionsChooser

interface OptionsChooser<R>

Helper lambda to specify FeatureOptions via convenience methods.

Calling multiple times the same method overrides the previously defined value.

Functions

withDescription

open fun withDescription(description: String): Unit

Wraps the given description into an Untranslatable and passes it to the overload which expects a Translatable -- this is then used as custom description instead of the previously defined description.

abstract fun withDescription(description: Translatable): Unit

Uses the given description as custom description instead of the previously defined description.

withRepresentation

open fun withRepresentation(representation: Any): Unit

Uses the given representation as representation of the subject in case the is defined instead of the so far defined representation (which defaults to the subject as such).

withSubjectBasedRepresentation

abstract fun withSubjectBasedRepresentation(representationProvider: (R) -> Any): Unit

Uses the given representationProvider which provides the representation for a given subject wrapped in Option instead of the so far defined representation (which defaults to the subject as such).

withTextRepresentation

open fun withTextRepresentation(representation: String): Unit

Wraps the given representation into a RawString and uses it as representation of the subject instead of the so far defined representation (which defaults to the subject as such).

Companion Object Functions

createAndBuild

fun <R> createAndBuild(configuration: FeatureExtractorBuilder.OptionsChooser<R>.() -> Unit): FeatureOptions<R>