Setter for **self.__pattern** attribute.

        :param value: Attribute value.
        :type value: unicode
171047
def pattern(self, value):
        

        if value is not None:
            assert type(value) in (unicode, QString), \
                "'{0}' attribute: '{1}' type is not 'unicode' or 'QString'!".format("pattern", value)
        self.__pattern = value
897006
def indent_marker(self, value):
        

        if value is not None:
            assert type(value) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format(
                "indent_marker", value)
            assert re.search(r"\s", value), "'{0}' attribute: '{1}' is not a whitespace character!".format(
                "indent_marker", value)
        self.__indent_marker = value
1136750
def pattern_to_str(pattern):
    
    if isinstance(pattern, str):
        return repr(pattern)
    else:
        return repr(pattern.pattern) if pattern else None
304170
def message(self, value):
        

        if value is not None:
            assert type(value) in (unicode, QString), \
                "'{0}' attribute: '{1}' type is not 'unicode' or 'QString'!".format("message", value)
        self.__message = value
745216
def setValue(self, value):
        
        self.__value = projex.text.decoded(value) if isinstance(value, (str, unicode)) else value
1243248
private PatternType readPatternType(JSONValue val) {

        PatternType patterntype;
        try {
            String str = readOptionalString(val);
            patterntype = PatternType.valueOf(str);
        } catch (@SuppressWarnings("unused") IllegalArgumentException e) {
            patterntype = PatternType.NONE;
        }
        return patterntype;
    }
201293
def set_value(self, value):
        
        self.raw_value = self.preference.serializer.serialize(value)
896416
def setValue(self, value):
        
        if isinstance(value, Text):
            self.value = value
        else:
            self.value = Text(value)
        return self
733581
def set_all_attribute_values(self, value):
        

        for attribute_name, type_instance in inspect.getmembers(self):

            if attribute_name.startswith('__') or inspect.ismethod(type_instance):
                # Ignore parameters with __ and if they are methods
                continue

            if isinstance(type_instance, bool):
                self.__dict__[attribute_name] = value
            elif isinstance(type_instance, self.__class__):
                type_instance.set_all_attribute_values(value)
1340698
public void setPattern(String name, Pattern pattern) {
        if (null == pattern) {
            set(name, null);
        } else {
            set(name, pattern.pattern());
        }
    }
693560
public static String decodeAttributeValue(String value)
	{
		String _result = value.replaceAll(PATTERN__ENTITY_QUOTE, VALUE__CHAR_QUOTE);
		_result = _result.replaceAll(PATTERN__ENTITY_AMPERSAND, VALUE__CHAR_AMPERSAND);
		return _result;
	}
317223
def set(self, value):
        

        if not isinstance(value, int_types) and not isinstance(value, str_cls):
            raise TypeError(unwrap(
                '''
                %s value must be an integer or a unicode string, not %s
                ''',
                type_name(self),
                type_name(value)
            ))

        if isinstance(value, str_cls):
            if value not in self._reverse_map:
                raise ValueError(unwrap(
                    '''
                    %s value "%s" is not a valid value
                    ''',
                    type_name(self),
                    value
                ))

            value = self._reverse_map[value]

        elif value not in self._map:
            raise ValueError(unwrap(
                '''
                %s value %s is not a valid value
                ''',
                type_name(self),
                value
            ))

        Integer.set(self, value)
1170379
def _set_unicode(self, value):
        
        values = list(self.unicodes)
        if value in values:
            values.remove(value)
        values.insert(0, value)
        self.unicodes = values
213933
public Pattern attribute(final String name, final Object value) {
        return attribute(name, String.valueOf(value));
    }
986792
def set_default(self, value):
        
        if value is None:
            self.__default = value
        elif not isinstance(value, str):
            raise TypeError("Default must be set to a String")
        else:
            self.__default = value
684197
def trigger_model(self, value):
        

        if value is not None:
            assert type(value) is bool, "'{0}' attribute: '{1}' type is not 'bool'!".format("trigger_model", value)
        self.__trigger_model = value
747915
def normalizeFeatureText(value):
    
    if not isinstance(value, basestring):
        raise TypeError("Feature text must be a string, not %s."
                        % type(value).__name__)
    return unicode(value)