Only changes the value of the property if it is not equals to the old one.
@param <T>
@param prop
@param newValue
492390
private static <T> void  setIfNew(Property<T> prop, T newValue)
  {
    if(!Objects.equals(prop.getValue(), newValue))
    {
      prop.setValue(newValue);
    }
  }
1359868
public T set(T newValue) {
		final T obj = this.object;
		this.object = newValue;
		return obj;
	}
1288453
function (propertyName, newValue, oldValue) {
            if (propertyName === 'value') {
                this._checkValue();// checks the value changed in the data model is a valid value from the select
                // options
                if (this.controller) {
                    var report = this.controller.checkValue(newValue);
                    this._reactToControllerReport(report, {
                        stopValueProp : true
                    });
                } else {
                    this._selectValue(newValue);
                }
            } else if (propertyName === 'mandatory') {
                this._updateState();
            } else if (propertyName === 'readOnly' || propertyName === 'disabled') {
                var selectField = this.getSelectField();
                var disabledOrReadonly = this.getProperty("disabled") || this.getProperty("readOnly");
                if (this._skinObj.simpleHTML) {
                    selectField.disabled = disabledOrReadonly ? "disabled" : "";
                }
                var tabIndex = disabledOrReadonly ? -1 : this._calculateTabIndex();
                selectField.tabIndex = tabIndex;
                this._updateState();
            } else if (propertyName === 'options') {
                if (this.controller) {
                    var selectValue = this.controller.getDataModel().value;
                    this.controller.setListOptions(newValue);
                    var report = this.controller.checkValue(selectValue);
                    this._reactToControllerReport(report, {
                        stopValueProp : false
                    });
                } else {
                    // markup for the options
                    var optionsMarkup = [];
                    var stringUtils = ariaUtilsString;
                    for (var i = 0, l = newValue.length; i < l; i++) {
                        // string cast, otherwise encoding will fail
                        var optValue = '' + newValue[i].value;
                        optionsMarkup.push('<option value="', stringUtils.encodeForQuotedHTMLAttribute(optValue), '">', stringUtils.escapeHTML(newValue[i].label), '</option>');
                    }

                    var selectField = this.getSelectField();
                    var currentValue = selectField.value;
                    // update the options list
                    var optionsListString = optionsMarkup.join('');
                    if (ariaCoreBrowser.isIE9 || ariaCoreBrowser.isIE8 || ariaCoreBrowser.isIE7) {
                        // innerHTML replacing in IE truncates the first element and breaks the whole select...
                        selectField.innerHTML = '';
                        var helperDiv = Aria.$window.document.createElement('div');
                        helperDiv.innerHTML = '<select>' + optionsListString + '</select>';
                        var options = helperDiv.children[0].children;
                        while (options.length) {
                            selectField.appendChild(options[0]);
                        }
                    } else {
                        selectField.innerHTML = optionsListString;
                    }
                    this._selectValue(currentValue);
                }

            } else if (propertyName === 'formatError' || propertyName === 'formatErrorMessages'
                    || propertyName === 'error' || propertyName === 'errorMessages') {
                this._cfg[propertyName] = newValue;
                this._updateState();
            } else {
                this.$DropDownInput._onBoundPropertyChange.apply(this, arguments);
            }
        }
929249
public void setValue (String name, long value)
    {
        Long oldValue = null;
        if (_prefs.get(name, null) != null || _props.getProperty(name) != null) {
            oldValue = Long.valueOf(_prefs.getLong(name, super.getValue(name, 0L)));
        }

        _prefs.putLong(name, value);
        _propsup.firePropertyChange(name, oldValue, Long.valueOf(value));
    }
579368
function(obj, propName)
{
	if (obj instanceof conbo.EventDispatcher)
	{
		var options = {property:propName, value:obj[propName]};
		
		obj.dispatchEvent(new conbo.ConboEvent('change:'+propName, options));
		obj.dispatchEvent(new conbo.ConboEvent('change', options));
	}
}
854949
public function assignExisting ( $propName, $propValue ) {
        if (is_bool( $this->$propName )) {
            if (strtolower( $propValue ) == 'false') {
                $propValue = false;
            }
            $this->$propName = (bool) $propValue;
        } elseif (is_int( $this->$propName )) {
            $this->$propName = (int) $propValue;
        } elseif (is_bool( $this->$propName )) {
            $this->$propName = (bool) $propValue;
        } elseif ($this->$propName instanceof Timer || $this->$propName == MapConst::TIMER) {
            $this->$propName = new Timer( $propValue );
        } else {
            $this->$propName = $propValue;
        }
    }
350779
function (name, newValue) {
		if (arguments.length > 1) {
			this.setValue(name, newValue);
		}
		else {
			var attrs = name;
			this.setMap(attrs);
		}
	}
1034589
public void setUserAttribute(String key, Object newValue)
    {
        Object oldValue = userAttributes.put(key, newValue);
        propertyChangeSupport.firePropertyChange(key, oldValue, newValue);
        propertyChangeSupport.firePropertyChange(USER_ATTRIBUTES, null, userAttributes);
    }
842943
public void setProperty(final String property, final Object newValue) {
        this.delegate.setProperty(this.wrapped, property, newValue);
    }
1071536
public static void setPropertyValue( final Object root,
                                         final Object newValue,
                                         final String... properties ) {

        Object object = root;

        int index = 0;


        try {

            for ( String property : properties ) {


                Map<String, FieldAccess> fields = getFieldsFromObject( object );
                FieldAccess field = fields.get( property );


                if ( isDigits( property ) ) {
                    /* We can index numbers and names. */
                    object = idx ( object, StringScanner.parseInt(property) );

                } else {

                    if ( field == null ) {
                        die( Str.sputs(
                                        "We were unable to access property=", property,
                                        "\nThe properties passed were=", properties,
                                        "\nThe root object is =", root.getClass().getName(),
                                        "\nThe current object is =", object.getClass().getName()
                                )
                        );
                    }


                    if ( index == properties.length - 1 ) {
                        field.setValue( object, newValue );
                    } else {
                        object = field.getObject( object );
                    }
                }

                index++;
            }
        } catch (Exception ex) {
            Exceptions.requireNonNull(root, "Root cannot be null");
            handle(ex, "Unable to set property for root object", className(root),
                    "for property path", properties, "with new value", newValue,
                    "last object in the tree was",
                    className(object), "current property index", index);
        }

    }
240254
public void setExtProperty(String propName, String propValue) {
        if (m_extProperties == null) {
            m_extProperties = new HashMap<String, String>();
        }
        m_extProperties.put(propName, propValue);

    }
1263102
protected void setValue(int newPosition, T1 valueSum, long valueN,
      boolean currentExisting) {
    if (valueN > 0) {
      if (currentExisting) {
        newBasicValueSumList[newPosition] = operations
            .add11(newBasicValueSumList[newPosition], valueSum);
        newBasicValueNList[newPosition] += valueN;
      } else {
        newBasicValueSumList[newPosition] = valueSum;
        newBasicValueNList[newPosition] = valueN;
      }
    }
  }
356070
public boolean cas(T expected, T newValue) {
        try {
            lock.writeLock().lock();

            if (Objects.equals(value, expected)) {
                this.value = newValue;
                return true;
            } else
                return false;
        } finally {
            lock.writeLock().unlock();
        }
    }
649966
function(value) {
      const oldValue = this[subScriptName];

      // TODO: add custom comparison options function
      if (oldValue === value) {
        return;
      }

      // Clear old child model
      if (oldValue && oldValue instanceof Model && oldValue.parentModel === this) {
        this.removeModelChild(oldValue);
      }

      this[subScriptName] = value;

      // Update new child model
      if (value && value instanceof Model) {
        this.addModelChild(name, value);
      }

      let po = this.propertyOptions[name];

      let onChange = po.onChange;
      let doNotNotify = po.doNotNotify;
      let skipNotify = false;

      if (onChange) {
        skipNotify = onChange(oldValue, value);
      }

      if (this.propertyChange) {
        this.propertyChange(name, oldValue, value);
      }

      if (!this.deserializing && !skipNotify && !doNotNotify) {
        this.notify(name, this, value, this.getChangeDescriptor(name, oldValue, value));
      }
    }
300374
private void updateVertexProperty(AtlasVertex vertex, String propertyName, Date newValue) {
        if (newValue != null) {
            Number currValue = vertex.getProperty(propertyName, Number.class);

            if (currValue == null || !currValue.equals(newValue.getTime())) {
                vertex.setProperty(propertyName, newValue.getTime());
            }
        }
    }
1118189
public T set(final T newValue) {
        if(continuous!=null)
         continuous.offer(newValue);

        setDiscreteIfDiff(newValue);
        return newValue;
    }
1306554
public void set(String propName, Object value) {
        if (propName.equals("uniqueId")) {
            setUniqueId(((String) value));
        }
        if (propName.equals("uniqueName")) {
            setUniqueName(((String) value));
        }
        if (propName.equals("externalId")) {
            setExternalId(((String) value));
        }
        if (propName.equals("externalName")) {
            setExternalName(((String) value));
        }
        if (propName.equals("repositoryId")) {
            setRepositoryId(((String) value));
        }
    }