Violation

data class Violation @JvmOverloads constructor(val interval: Interval, val message: String? = null, val ids: List<ActivityId> = listOf()) : IntervalLike<Violation>

A single violation of a constraint.

Constructors

Link copied to clipboard
constructor(interval: Interval, message: String? = null, ids: List<ActivityId> = listOf())

Properties

Link copied to clipboard
val ids: List<ActivityId>

List of associated activities (directives or instances) that are related to the violation.

Link copied to clipboard
open override val interval: Interval

Interval on which the violation occurs.

Link copied to clipboard
val message: String? = null

Violation message to be displayed to user.

Functions

Link copied to clipboard
fun withNewIds(vararg id: ActivityId): Violation
fun withNewIds(ids: List<ActivityId>): Violation

Constructs a violation on the same interval with a different list of ids.

Link copied to clipboard
open override fun withNewInterval(i: Interval): Violation

Creates a new object that is identical except that it exists on a different interval.