intellij-randomness / com.fwdekker.randomness.string / StringScheme

StringScheme

data class StringScheme : Scheme<StringScheme>

Contains settings for generating random strings.

Constructors

<init>

StringScheme(myName: String = DEFAULT_NAME, minLength: Int = DEFAULT_MIN_LENGTH, maxLength: Int = DEFAULT_MAX_LENGTH, enclosure: String = DEFAULT_ENCLOSURE, capitalization: CapitalizationMode = DEFAULT_CAPITALIZATION, symbolSets: Map<String, String> = DEFAULT_SYMBOL_SETS.toMap(), activeSymbolSets: Map<String, String> = DEFAULT_ACTIVE_SYMBOL_SETS.toMap(), excludeLookAlikeSymbols: Boolean = DEFAULT_EXCLUDE_LOOK_ALIKE_SYMBOLS)

Contains settings for generating random strings.

Properties

activeSymbolSetList

var activeSymbolSetList: Collection<SymbolSet>

A list view of the SymbolSet objects described by activeSymbolSets.

activeSymbolSets

var activeSymbolSets: Map<String, String>

The symbol sets that are actually used for generating strings; a subset of symbolSets.

capitalization

var capitalization: CapitalizationMode

The capitalization mode of the generated string.

enclosure

var enclosure: String

The string that encloses the generated string on both sides.

excludeLookAlikeSymbols

var excludeLookAlikeSymbols: Boolean

Whether the symbols in SymbolSet.lookAlikeCharacters should be excluded.

maxLength

var maxLength: Int

The maximum length of the generated string, inclusive.

minLength

var minLength: Int

The minimum length of the generated string, inclusive.

myName

var myName: String

The name of the scheme.

serializedActiveSymbolSets

var serializedActiveSymbolSets: Map<String, String>

Same as activeSymbolSets, except that all emoji are serialized.

serializedSymbolSets

var serializedSymbolSets: Map<String, String>

Same as symbolSets, except that all emoji are serialized.

symbolSetList

var symbolSetList: Collection<SymbolSet>

A list view of the SymbolSet objects described by symbolSets.

symbolSets

var symbolSets: Map<String, String>

The symbol sets that are available for generating strings.

Functions

copyAs

fun copyAs(name: String): StringScheme

Returns a copy of this scheme that has the given name.

copyFrom

fun copyFrom(other: StringScheme): Unit

Shallowly copies the state of other into this.

Inherited Functions

getName

open fun getName(): String

Same as myName.

Companion Object Properties

DEFAULT_ACTIVE_SYMBOL_SETS

val DEFAULT_ACTIVE_SYMBOL_SETS: Map<String, String>

The default value of the activeSymbolSets field.

DEFAULT_CAPITALIZATION

val DEFAULT_CAPITALIZATION: CapitalizationMode

The default value of the capitalization field.

DEFAULT_ENCLOSURE

const val DEFAULT_ENCLOSURE: String

The default value of the enclosure field.

DEFAULT_EXCLUDE_LOOK_ALIKE_SYMBOLS

const val DEFAULT_EXCLUDE_LOOK_ALIKE_SYMBOLS: Boolean

The default value of the excludeLookAlikeSymbols field.

DEFAULT_MAX_LENGTH

const val DEFAULT_MAX_LENGTH: Int

The default value of the maxLength field.

DEFAULT_MIN_LENGTH

const val DEFAULT_MIN_LENGTH: Int

The default value of the minLength field.

DEFAULT_SYMBOL_SETS

val DEFAULT_SYMBOL_SETS: Map<String, String>

The default value of the symbolSets field.