LimitsValidator
class LimitsValidator
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 thank
. If the maximum
m?
is not empty, then:- Its value must not be larger than
k
. - Its value must not be smaller than
n
.
- Its value must not be larger than
- 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
|
Validator of Limits nodes.
From the docs:
Limits must have meaningful bounds that are within a given range.
n
must not be larger thank
.If the maximum
m?
is not empty, then:k
.n
.k
.