Пример #1
0
 public function test_that_has_returns_true_for_valid_key()
 {
     $tree = new RedBlackSearchTree(new ComparableComparator());
     foreach ($this->getWeekDays() as $value => $key) {
         $tree->set($key, $value);
     }
     $this->assertTrue($tree->has(WeekDay::SATURDAY()));
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function contains($item) : bool
 {
     return $this->tree->has($item);
 }
Пример #3
0
 /**
  * {@inheritdoc}
  */
 public function has($key) : bool
 {
     return $this->tree->has($key);
 }