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

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

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

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

Contract

Throws a RangeError if min >= max.

Implementation

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