/** * Updates the value contained in this instance and notifies registered listeners. * @param force if true, the listeners will always be notified, if false the will be notified * only if the new value is not equal to the old value (per {@link #areEqual}). * @return the previously contained value. */ protected T updateAndNotify (T value, boolean force) { checkMutate(); T ovalue = updateLocal(value); if (force || !areEqual(value, ovalue)) { emitChange(value, ovalue); } return ovalue; }
/** * Updates the value contained in this instance and notifies registered listeners. * @param force if true, the listeners will always be notified, if false the will be notified * only if the new value is not equal to the old value (per {@link #areEqual}). * @return the previously contained value. */ protected T updateAndNotify (T value, boolean force) { checkMutate(); T ovalue = updateLocal(value); if (force || !areEqual(value, ovalue)) { emitChange(value, ovalue); } return ovalue; }