public function remove($element) {
        foreach ($this->elements as $index => $e) {
            if ($e === $element) {
                unset($this->elements[$index]);
                $this->fire(new SetRemoveEvent($element));
                return;
            }
        }
    }