DateTimeScheme

data class DateTimeScheme(var minDateTime: Long = DEFAULT_MIN_DATE_TIME, var maxDateTime: Long = DEFAULT_MAX_DATE_TIME, var pattern: String = DEFAULT_PATTERN, val arrayDecorator: ArrayDecorator = ArrayDecorator()) : Scheme(source)

Contains settings for generating random date-times.

Constructors

Link copied to clipboard
constructor(minDateTime: Long = DEFAULT_MIN_DATE_TIME, maxDateTime: Long = DEFAULT_MAX_DATE_TIME, pattern: String = DEFAULT_PATTERN, arrayDecorator: ArrayDecorator = ArrayDecorator())

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
open override val decorators: List<ArrayDecorator>

Additional logic that determines how strings are generated.

Link copied to clipboard
var maxDateTime: Long

The maximum date-time as a millisecond epoch to be generated, inclusive.

Link copied to clipboard
var minDateTime: Long

The minimum date-time as a millisecond epoch to be generated, inclusive.

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 pattern in which the generated date-time is formatted.

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): DateTimeScheme

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>

Generates count random data according to the settings in this scheme, ignoring settings from decorators.