Exemple #1
0
 /**
  * Добавляет подмножество
  *
  * @param SimpleRangeSetInterface $set
  */
 public function addSet(SimpleRangeSetInterface $set)
 {
     $this->subtractSet($set->copy());
     $this->sets[] = $set->copy();
     $this->optimize();
 }
Exemple #2
0
 /**
  * Проверяет, граничат ли они в одной точке (в начале или в конце)
  *
  * @param SimpleRangeSetInterface $set
  *
  * @return bool
  */
 public function isBound(SimpleRangeSetInterface $set)
 {
     return $set->getBegin() == $this->getEnd() || $set->getEnd() == $this->getBegin();
 }