public function testIncludes() { $range = new Range(5, 10); $otherRange = new Range(6, 8); $this->assertTrue($range->includes($otherRange)); }
/** * Checks whether the given <code>Range</code> overlaps this range * @param range * @return true if the given range overlaps this range */ public function overlaps(Range $range) { return $range->contains($this->start) || $range->contains($this->end) || $this->includes($range); }