interface OptionsChooser<R>
Helper lambda to specify FeatureOptions via convenience methods.
Calling multiple times the same method overrides the previously defined value.
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. |
|
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). |
|
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). |
|
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). |
fun <R> createAndBuild(configuration: FeatureExtractorBuilder.OptionsChooser<R>.() -> Unit): FeatureOptions<R> |