public function offsetSet($offset, $value)
    {
        if (!(is_integer($offset) && $offset >= 0 && $offset <= $this->count()))
        {
            throw new \InvalidArgumentException('The offset must be a valid, positive integer.');
        }

        if (!$value instanceof Token)
        {
            throw new \InvalidArgumentException('The value provided must be a token.');
        }

        $this->tokens[$offset] = $value;
    }