def from_string(line):
        """
        Parses semicolon-separated key-value pairs and returns them as a StringValueMap.

        :param line: semicolon-separated key-value list to initialize StringValueMap.

        :return: a newly created StringValueMap.
        """
        result = StringValueMap()
        
        if line == None or len(line) == 0:
            return result

        tokens = str(line).split(';')
        for token in tokens:
            if len(token) == 0:
                continue
            index = token.find('=')
            key = token[0:index] if index >= 0 else token
            value = token[index + 1:] if index >= 0 else None
            result.put(key, value)

        return result
def from_string ( line ) : result = StringValueMap ( ) if line == None or len ( line ) == 0 : return result tokens = str ( line ) . split ( ';' ) for token in tokens : if len ( token ) == 0 : continue index = token . find ( '=' ) key = token [ 0 : index ] if index >= 0 else token value = token [ index + 1 : ] if index >= 0 else None result . put ( key , value ) return result
Parses semicolon-separated key-value pairs and returns them as a StringValueMap.

        :param line: semicolon-separated key-value list to initialize StringValueMap.

        :return: a newly created StringValueMap.