public function getEntryByPosition($position)
    {
        if ($position < 0) {
            $position = count($this) + $position - 1;
        }

        if (isset($this->entries[$position])) {
            return $this->entries[$position];
        } else {
            throw new SwatException(
                sprintf(
                    'Navbar does not contain an entry at position %s.',
                    $position
                )
            );
        }
    }