StringScheme

data class StringScheme(var pattern: String = DEFAULT_PATTERN, var isRegex: Boolean = DEFAULT_IS_REGEX, var isNonMatching: Boolean = DEFAULT_IS_NON_MATCHING, var capitalization: CapitalizationMode = DEFAULT_CAPITALIZATION, var removeLookAlikeSymbols: Boolean = DEFAULT_REMOVE_LOOK_ALIKE_SYMBOLS, val arrayDecorator: ArrayDecorator = DEFAULT_ARRAY_DECORATOR) : Scheme(source)

Contains settings for generating random strings.

Constructors

Link copied to clipboard
constructor(pattern: String = DEFAULT_PATTERN, isRegex: Boolean = DEFAULT_IS_REGEX, isNonMatching: Boolean = DEFAULT_IS_NON_MATCHING, capitalization: CapitalizationMode = DEFAULT_CAPITALIZATION, removeLookAlikeSymbols: Boolean = DEFAULT_REMOVE_LOOK_ALIKE_SYMBOLS, arrayDecorator: ArrayDecorator = DEFAULT_ARRAY_DECORATOR)

Types

Link copied to clipboard
object Companion

Holds constants.

Properties

Link copied to clipboard

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

Link copied to clipboard

The capitalization mode of the generated string.

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

Additional logic that determines how strings are generated.

Link copied to clipboard
var isNonMatching: Boolean

true if and only if non-matching values should be generated if isRegex is true.

Link copied to clipboard
var isRegex: Boolean

true if and only if pattern should be interpreted as a regex.

Link copied to clipboard
open override val name: String

The name of the scheme as shown to the user.

Link copied to clipboard
var pattern: String

The regex-like pattern according to which the string is generated.

Link copied to clipboard

Whether the symbols in LOOK_ALIKE_CHARACTERS should be removed.

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 deepCopy(retainUuid: Boolean): StringScheme

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 strings of random alphanumerical characters.

Link copied to clipboard
fun isSimple(): Boolean

Returns true if and only if this scheme does not use any regex functionality beyond escape characters.