DecimalScheme

data class DecimalScheme(    var myName: String = DEFAULT_NAME,     var minValue: Double = DEFAULT_MIN_VALUE,     var maxValue: Double = DEFAULT_MAX_VALUE,     var decimalCount: Int = DEFAULT_DECIMAL_COUNT,     var showTrailingZeroes: Boolean = DEFAULT_SHOW_TRAILING_ZEROES,     var groupingSeparator: String = DEFAULT_GROUPING_SEPARATOR,     var decimalSeparator: String = DEFAULT_DECIMAL_SEPARATOR,     var prefix: String = DEFAULT_PREFIX,     var suffix: String = DEFAULT_SUFFIX) : Scheme<DecimalScheme>

Contains settings for generating random decimals.

See also

Constructors

Link copied to clipboard
fun DecimalScheme(    myName: String = DEFAULT_NAME,     minValue: Double = DEFAULT_MIN_VALUE,     maxValue: Double = DEFAULT_MAX_VALUE,     decimalCount: Int = DEFAULT_DECIMAL_COUNT,     showTrailingZeroes: Boolean = DEFAULT_SHOW_TRAILING_ZEROES,     groupingSeparator: String = DEFAULT_GROUPING_SEPARATOR,     decimalSeparator: String = DEFAULT_DECIMAL_SEPARATOR,     prefix: String = DEFAULT_PREFIX,     suffix: String = DEFAULT_SUFFIX)

Types

Link copied to clipboard
object Companion

Holds constants.

Functions

Link copied to clipboard
open override fun copyAs(name: String): DecimalScheme

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

Link copied to clipboard
open override fun copyFrom(other: DecimalScheme)

Shallowly copies the state of other into this.

Link copied to clipboard
@NotNull
@Nls
open fun getDisplayName(): @NotNull @Nls String
Link copied to clipboard
open override fun getName(): String

Same as myName.

Link copied to clipboard
fun safeSetDecimalSeparator(decimalSeparator: String?)

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

Link copied to clipboard
fun safeSetGroupingSeparator(groupingSeparator: String?)

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

Properties

Link copied to clipboard
var decimalCount: Int

The number of decimals to display.

Link copied to clipboard
var decimalSeparator: String

The character that should separate decimals.

Link copied to clipboard
var groupingSeparator: String

The character that should separate groups.

Link copied to clipboard
var maxValue: Double

The maximum value to be generated, inclusive.

Link copied to clipboard
var minValue: Double

The minimum value to be generated, inclusive.

Link copied to clipboard
open override var myName: String

The name of the scheme.

Link copied to clipboard
var prefix: String

The string to prepend to the generated value.

Link copied to clipboard
var showTrailingZeroes: Boolean

Whether to include trailing zeroes in the decimals.

Link copied to clipboard
var suffix: String

The string to append to the generated value.

Sources

Link copied to clipboard