Scheme

abstract class Scheme : State(source)

A scheme is a State that is also a configurable random number generator.

Schemes may use DecoratorSchemes to extend their functionality.

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract val decorators: List<DecoratorScheme>

Additional logic that determines how strings are generated.

Link copied to clipboard
open val icon: OverlayedIcon?

The icon signifying this scheme in its entirety, or null if it does not have an icon.

Link copied to clipboard
abstract val name: String

The name of the scheme as shown to the user.

Link copied to clipboard
var random: Random

The random number generator used to generate random values.

Link copied to clipboard
open 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
abstract override fun deepCopy(retainUuid: Boolean): Scheme

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

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

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

Link copied to clipboard
protected abstract fun generateUndecoratedStrings(count: Int = 1): List<String>

Generates count random data according to the settings in this scheme, ignoring settings from decorators.