def get_as_type(self, key, value_type):
        """
        Converts map element into a value defined by specied typecode.
        If conversion is not possible it returns default value for the specified type.

        :param key: an index of element to get.

        :param value_type: the TypeCode that defined the type of the result

        :return: element value defined by the typecode or default if conversion is not supported.
        """
        value = self.get(key)
        return TypeConverter.to_type(value_type, value)