LimitsValidator

LimitsValidator

class LimitsValidator

Validator of Limits nodes.

From the docs:

Limits must have meaningful bounds that are within a given range.


{min n, max m?}

  • The value of n must not be larger than k.
  • If the maximum m? is not empty, then:

    • Its value must not be larger than k.
    • Its value must not be smaller than n.
  • Then the limit is valid within range k.

Constructors

<init>

constructor(range: Long)

Validator of Limits nodes.

From the docs:

Limits must have meaningful bounds that are within a given range.


{min n, max m?}

  • The value of n must not be larger than k.
  • If the maximum m? is not empty, then:

    • Its value must not be larger than k.
    • Its value must not be smaller than n.
  • Then the limit is valid within range k.

Parameters

Name Description
range: Long

Methods

visit

fun visit(node: Limits, context: ValidationContext): ValidationContext

Validates the given node, and if necessary: its children (recursively, using other ValidationVisitor instances).

Parameters

Name Description
node: Limits
context: ValidationContext

ReturnValue

Name Description
ValidationContext