AttributeConstraint

@Immutable(containerOf = ["T"])
sealed class AttributeConstraint<out T> : Constraint

Constraint that checks a single attribute of the KeyDescription.

Inheritors

Types

Link copied to clipboard
Link copied to clipboard
@Immutable(containerOf = ["T"])
data class STRICT<T>(val l: String, val expectedVal: T, m: AttributeMapper) : AttributeConstraint<T>

Checks that the attribute exists and matches the expected value.

Properties

Link copied to clipboard
open override val label: String

Fixed label, suitable for logging or metrics.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun check(description: KeyDescription): Constraint.Result

Evaluates whether the description is satisfied by this AttributeConstraint.