Exemplo n.º 1
0
 /**
  * # Examples:
  *
  *     This:  □□□□□□□□□□□■■■■■■■■■■■■■■■■■■■■■■■■□□□□□□□□□□
  *     Other: □□□□□□□□□□□□□□□□□□■■■■■■■■■■■□□□□□□□□□□□□□□□□
  *
  *     This:  □□□□□□□□□□□■■■■■■■■■■■■■■■■■■■■■■■■□□□□□□□□□□
  *     Other: □□□□□□□□□□□■■■■■■■■■■■■■■■■■■■■■■■■□□□□□□□□□□
  *
  * # False example:
  *
  *     This:  □□□□□□□□□□□□□□□□□□■■■■■■■■■■■□□□□□□□□□□□□□□□□
  *     Other: □□□□□□□□□□□■■■■■■■■■■■■■■■■■■■■■■■■□□□□□□□□□□
  *
  * @param Interval $other
  * @return bool
  */
 public function isContaining(Interval $other) : bool
 {
     return ($this->isContainingElement($other->getLeft()->getValue()) || $other->isLeftOpened() && $this->isElementLeftOpenedBorder($other->getLeft()->getValue())) && ($this->isContainingElement($other->getRight()->getValue()) || $other->isRightOpened() && $this->isElementRightOpenedBorder($other->getRight()->getValue()));
 }