DecoratorScheme

abstract class DecoratorScheme : Scheme(source)

Transparently extends or alters the functionality of a Scheme with a decorating function.

Requires that generator is set before invoking generateStrings.

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
lateinit var generator: (Int) -> List<String>

The generating function whose output should be decorated.

Link copied to clipboard
protected open val isEnabled: Boolean = true

Whether this decorator is enabled, or whether any invocation of generateStrings should be passed directly to the generator.

Functions

Link copied to clipboard
abstract override fun deepCopy(retainUuid: Boolean): DecoratorScheme

Returns a deep copy, retaining the uuid if and only if retainUuid is true.

Link copied to clipboard
open override fun generateStrings(count: Int): List<String>

Generates count random decorated data according to the settings in this scheme and its decorators.