Interval<T extends Comparable<Object?>>.closedOpen constructor

  1. @Possible({RangeError})
Interval<T extends Comparable<Object?>>.closedOpen(
  1. T min,
  2. T max
)

Creates an Interval with the closed lower bound and open upper bound.

In other words, this interval includes min and excludes max, i.e. { x | min <= x < max }.

Contract

Throws a RangeError if min >= max.

Implementation

@Possible({RangeError})
Interval.closedOpen(T min, T max): min = (value: min, open: false), max = (value: max, open: true) {
  _precondition('[', min, max, ')');
}