intellij-randomness / com.fwdekker.randomness.integer / IntegerScheme

IntegerScheme

data class IntegerScheme : Scheme<IntegerScheme>

Contains settings for generating random integers.

Constructors

<init>

IntegerScheme(myName: String = DEFAULT_NAME, minValue: Long = DEFAULT_MIN_VALUE, maxValue: Long = DEFAULT_MAX_VALUE, base: Int = DEFAULT_BASE, groupingSeparator: String = DEFAULT_GROUPING_SEPARATOR, prefix: String = DEFAULT_PREFIX, suffix: String = DEFAULT_SUFFIX)

Contains settings for generating random integers.

Properties

base

var base: Int

The base the generated value should be displayed in.

groupingSeparator

var groupingSeparator: String

The character that should separate groups.

maxValue

var maxValue: Long

The maximum value to be generated, inclusive.

minValue

var minValue: Long

The minimum value to be generated, inclusive.

myName

var myName: String

The name of the scheme.

prefix

var prefix: String

The string to prepend to the generated value.

suffix

var suffix: String

The string to append to the generated value.

Functions

copyAs

fun copyAs(name: String): IntegerScheme

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

copyFrom

fun copyFrom(other: IntegerScheme): Unit

Shallowly copies the state of other into this.

safeSetGroupingSeparator

fun safeSetGroupingSeparator(groupingSeparator: String?): Unit

Sets the grouping separator safely to ensure that exactly one character is set.

Inherited Functions

getName

open fun getName(): String

Same as myName.

Companion Object Properties

DECIMAL_BASE

const val DECIMAL_BASE: Int

The definition of decimal base.

DEFAULT_BASE

const val DEFAULT_BASE: Int

The default value of the base field.

DEFAULT_GROUPING_SEPARATOR

const val DEFAULT_GROUPING_SEPARATOR: String

The default value of the groupingSeparator field.

DEFAULT_MAX_VALUE

const val DEFAULT_MAX_VALUE: Long

The default value of the maxValue field.

DEFAULT_MIN_VALUE

const val DEFAULT_MIN_VALUE: Long

The default value of the minValue field.

DEFAULT_PREFIX

const val DEFAULT_PREFIX: String

The default value of the prefix field.

DEFAULT_SUFFIX

const val DEFAULT_SUFFIX: String

The default value of the suffix field.

MAX_BASE

const val MAX_BASE: Int

The maximum value of the base field.

MIN_BASE

const val MIN_BASE: Int

The minimum value of the base field.