Template

data class Template(var name: String = DEFAULT_NAME, val schemes: MutableList<Scheme> = DEFAULT_SCHEMES, val arrayDecorator: ArrayDecorator = DEFAULT_ARRAY_DECORATOR) : Scheme(source)

Generates random data by concatenating the random outputs of a list of Schemes.

Constructors

Link copied to clipboard
constructor(name: String = DEFAULT_NAME, schemes: MutableList<Scheme> = DEFAULT_SCHEMES, arrayDecorator: ArrayDecorator = DEFAULT_ARRAY_DECORATOR)

Types

Link copied to clipboard
object Companion

Holds constants.

Properties

Link copied to clipboard
val actionId: String

The identifier of the action that inserts this Template.

Link copied to clipboard

Settings that determine whether the output should be an array of values.

Link copied to clipboard
open override val decorators: List<ArrayDecorator>

Additional logic that determines how strings are generated.

Link copied to clipboard
open override var name: String

The unique name of the template.

Link copied to clipboard
val schemes: MutableList<Scheme>

The ordered list of underlying schemes.

Link copied to clipboard
open override val typeIcon: TypeIcon

The icon signifying the type of data represented by this scheme, ignoring its decorators, or null if this scheme does not represent any kind of data, as is the case for DecoratorSchemes.

Functions

Link copied to clipboard
open override fun applyContext(context: Box<Settings>)

Sets the State.context of this State to context.

Link copied to clipboard
fun canReference(target: Template): Boolean

Returns true if this template can add a TemplateReference that refers to target without causing recursion within the current context.

Link copied to clipboard
open override fun deepCopy(retainUuid: Boolean): Template

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

Link copied to clipboard
open override fun doValidate(): String?

Validates the state, and indicates whether and why it is invalid.

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

Generates count random strings by concatenating the outputs of the schemes.