Interval<T extends Comparable<Object?> >.closed constructor
Creates an Interval with the closed lower and upper bounds.
In other words, this interval includes both min
and max
, i.e. { x | min <= x <= max }
.
Contract
Throws a RangeError if min > max
.
Implementation
@Possible({RangeError})
Interval.closed(T min, T max): min = (value: min, open: false), max = (value: max, open: false) {
_precondition('[', min, max, ']');
}