ArrayDecorator

data class ArrayDecorator(var enabled: Boolean = DEFAULT_ENABLED, var minCount: Int = DEFAULT_MIN_COUNT, var maxCount: Int = DEFAULT_MAX_COUNT, var separatorEnabled: Boolean = DEFAULT_SEPARATOR_ENABLED, var separator: String = DEFAULT_SEPARATOR, val affixDecorator: AffixDecorator = DEFAULT_AFFIX_DECORATOR) : DecoratorScheme(source)

The user-configurable collection of schemes applicable to generating arrays.

Constructors

Link copied to clipboard
constructor(enabled: Boolean = DEFAULT_ENABLED, minCount: Int = DEFAULT_MIN_COUNT, maxCount: Int = DEFAULT_MAX_COUNT, separatorEnabled: Boolean = DEFAULT_SEPARATOR_ENABLED, separator: String = DEFAULT_SEPARATOR, affixDecorator: AffixDecorator = DEFAULT_AFFIX_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
open override val decorators: List<AffixDecorator>

Additional logic that determines how strings are generated.

Link copied to clipboard
var enabled: Boolean

true if and only if arrays should be generated instead of singular values.

Link copied to clipboard
open override val icon: OverlayedIcon?

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

Link copied to clipboard
protected open override val isEnabled: Boolean

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

Link copied to clipboard
var maxCount: Int

The maximum number of elements to generate, inclusive.

Link copied to clipboard
var minCount: Int

The minimum number of elements to generate, inclusive.

Link copied to clipboard
open override val name: String

The name of the scheme as shown to the user.

Link copied to clipboard
var separator: String

The string to place between generated elements.

Link copied to clipboard
var separatorEnabled: Boolean

Whether to separate elements using separator.

Functions

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

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 data according to the settings in this scheme, ignoring settings from decorators.