Exemplo n.º 1
0
 /**
  * Removes the first occurrence of the specified element in this list.
  */
 public function remove1(Object $o)
 {
     if ($o == null) {
         for ($e = $this->header->next; $e != $this->header; $e = $e->next) {
             if ($e->element == null) {
                 $this->remove($e);
                 return true;
             }
         }
     } else {
         for ($e = $this->header->next; $e != $this->header; $e = $e->next) {
             if ($o->equals($e->element)) {
                 $this->remove($e);
                 return true;
             }
         }
     }
     return false;
 }