WordScheme

data class WordScheme(var words: List<String> = DEFAULT_WORDS, var capitalization: CapitalizationMode = DEFAULT_CAPITALIZATION, val affixDecorator: AffixDecorator = DEFAULT_AFFIX_DECORATOR, val arrayDecorator: ArrayDecorator = DEFAULT_ARRAY_DECORATOR) : Scheme(source)

Contains settings for generating random words.

Constructors

Link copied to clipboard
constructor(words: List<String> = DEFAULT_WORDS, capitalization: CapitalizationMode = DEFAULT_CAPITALIZATION, affixDecorator: AffixDecorator = DEFAULT_AFFIX_DECORATOR, arrayDecorator: ArrayDecorator = DEFAULT_ARRAY_DECORATOR)

Types

Link copied to clipboard
object Companion

Holds constants.

Properties

Link copied to clipboard

The affixation to apply to the generated values.

Link copied to clipboard

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

Link copied to clipboard

The way in which the generated word should be capitalized.

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

Additional logic that determines how strings are generated.

Link copied to clipboard
open override val name: String

The name of the scheme as shown to the user.

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.

Link copied to clipboard
var words: List<String>

The list of words to choose from.

Functions

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

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>

Returns count formatted random words.