Ejemplo n.º 1
0
 /**
  * Note that if the item is considered equal to an already existing item
  * in the set that it will be replaced.
  *
  * @param $item
  *
  * @return void
  */
 function add($item)
 {
     $this->bst->add($item);
 }
Ejemplo n.º 2
0
 /**
  * Note that if the key is considered equal to an already existing key in
  * the map that it's value will be replaced with the new one.
  *
  * @param $key
  * @param mixed $value
  *
  * @return void
  */
 function set($key, $value)
 {
     $this->avl->add(new Pair($key, $value));
 }