intellij-randomness / com.fwdekker.randomness.array / ArrayScheme

ArrayScheme

data class ArrayScheme : Scheme<ArrayScheme>

Contains settings for generating arrays of other types of random values.

Constructors

<init>

ArrayScheme(myName: String = DEFAULT_NAME, count: Int = DEFAULT_COUNT, brackets: String = DEFAULT_BRACKETS, separator: String = DEFAULT_SEPARATOR, isSpaceAfterSeparator: Boolean = DEFAULT_SPACE_AFTER_SEPARATOR)

Contains settings for generating arrays of other types of random values.

Properties

brackets

var brackets: String

The brackets to surround arrays with.

count

var count: Int

The number of elements to generate.

isSpaceAfterSeparator

var isSpaceAfterSeparator: Boolean

True iff a space should be placed after each separator.

myName

var myName: String

The name of the scheme.

separator

var separator: String

The string to place between generated elements.

Functions

arrayify

fun arrayify(strings: Collection<String>): String

Turns a collection of strings into a single string based on the fields of this ArraySettings object.

copyAs

fun copyAs(name: String): ArrayScheme

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

copyFrom

fun copyFrom(other: ArrayScheme): Unit

Shallowly copies the state of other into this.

Inherited Functions

getName

open fun getName(): String

Same as myName.

Companion Object Properties

DEFAULT_BRACKETS

const val DEFAULT_BRACKETS: String

The default value of the brackets field.

DEFAULT_COUNT

const val DEFAULT_COUNT: Int

The default value of the count field.

DEFAULT_SEPARATOR

const val DEFAULT_SEPARATOR: String

The default value of the separator field.

DEFAULT_SPACE_AFTER_SEPARATOR

const val DEFAULT_SPACE_AFTER_SEPARATOR: Boolean

The default value of the isSpaceAfterSeparator field.