public function remove($objElement)
    {
        $varKey = $this->inCollection($objElement, true);

        if ($varKey !== false) {
            // Element found. Now remove it.
            unset($this->collection[$varKey]);
        }

        $this->rebuild(); // Rebuild collection index.

        return true;
    }