operator | method Null safety

Interval operator |(
  1. Interval other
)

Implementation

Interval operator |(Interval other) {
  if (this == other) {
    return this;
  } else {
    return this.join(other);
  }
}