Adds the value that is in the text input field to the
recent entries in localStorage. Empty and duplicate
values are ignored.
498271
function() {
			var value = this.getTextInputValue();
			if (value) {
				var recentEntryArray = this.getRecentEntryArray();
				if (!recentEntryArray) {
					recentEntryArray = [];
				}
				
				var indexOfElement = this._getIndexOfValue(recentEntryArray, value); //check if a duplicate entry exists
				if (0 !== indexOfElement) {
					// element is either not in array, or not in first position
					if (-1 !== indexOfElement) {
						// element is in array, remove it because we want to add it to beginning
						recentEntryArray.splice(indexOfElement, 1);
					}
					
					//add new entry to beginning of array
					recentEntryArray.unshift({
						type: "proposal", //$NON-NLS-0$
						label: value, 
						value: value
					});
					this._storeRecentEntryArray(recentEntryArray);
					
					this._showRecentEntryButton();
				}
			}
		}
1334867
def put_if_empty(self, key, value):
        
        if self.has_data_for_key(key):
            return False
        self.put_data(key, value)
        return True
586712
public void add(T newValue) {
		if (this.isSet) {
			if (!this.isMultiple
					&& newValue != this.object && (newValue == null || !newValue.equals(this.object))) {
				this.isMultiple = true;
				this.object = null;
			}
		} else {
			this.object = newValue;
			this.isSet = true;
			this.isMultiple = false;
		}
	}
666679
function (newValues) {
            var arrayUtil = ariaUtilsArray;

            this._stopUpdates();
            var newlySelectedIndexes = [];
            var newlyUnselectedIndexes = [];

            // Loop through all of the items and update the selection status for each item,
            // depending on the new array of selected values
            var selectedIndex = -1;
            var data = this._data;
            var items = data.items;
            var maxSelectedCount = this._getTrueMaxSelectedCount(items);
            var selectedCount = 0;
            for (var idx = 0, length = items.length; idx < length; idx++) {
                var item = items[idx];
                var selected = arrayUtil.contains(newValues, item.value);
                if (selected) {
                    if (selectedCount == maxSelectedCount) {
                        // cancel selection when there is more than what is allowed
                        selected = false;
                    } else if (selectedIndex == -1) {
                        selectedCount = 1;
                        selectedIndex = idx;
                    } else {
                        selectedCount++;
                        selectedIndex = null;
                    }
                }
                if (data.preselect === "none" || item.selected != selected) {
                    // selection has changed
                    (selected ? newlySelectedIndexes : newlyUnselectedIndexes).push(idx);
                    this.json.setValue(items[idx], "selected", selected);
                }
            }
            this.json.setValue(data, "selectedIndex", selectedIndex);
            this.json.setValue(data, "selectedCount", selectedCount);

            // James removed this because if more than one item is selected, data. selectedIndex is set to null.
            // Also, in the case of the multi-select we don't necessarily
            // Want to focus a selected item - need to check this on the list.
            // this.json.setValue(data, "focusIndex", selectedIndex);
            // this.setFocus(data.focusIndex);

            this._updateCurrentlyDisabled(items);
            this._resumeUpdates();
            if (newlySelectedIndexes.length > 0 || newlyUnselectedIndexes.length > 0) {
                this._raiseOnChangeEvent(newlySelectedIndexes, newlyUnselectedIndexes);
            }
        }
909316
public void addText(String str)
	{
		if (selectingText)
			deleteSelectedText();

		final StringBuilder oldText = this.text;
		final String oldValue = this.text.toString();
		String newValue = oldText.insert(this.cursor.index, str).toString();

		if (this.filterFunction != null)
			newValue = this.filterFunction.apply(newValue);

		if (!fireEvent(new ComponentEvent.ValueChange<>(this, oldValue, newValue)))
			return;

		this.text = new StringBuilder(newValue);
		guiText.setText(newValue);

		cursor.jumpBy(str.length());
	}
678179
function addValue(e){

    var len;

    if (e.old === 'valueStart') {
      var history = this.get('history');
      len = history.length;
      var preStatus = history[len - 3];
      isNew = preStatus == 'ruleStart';
      value = this._getLast(isNew, 'values');

      value && value.push(e.data);
    } else {
      var metas = this.get('metas');
      var selectors = this.get('selectors');
      len = selectors.length;
      metas[len] = metas[len] || [];
      var data = '';

      /*when @import url("booya.css") print, screen;*/
      if (e.old === 'selectorBreak'){
        data = selectors.pop().join(', ') + ', ';
        var lines = this.get('lines');
        lines.pop();
      }

      data += e.data;
      metas[len].push(data);
    }
  }
136517
function(value, sendUpdatedEvt) {
	   
	   if(!lang.isArray(value) ) {
	      throw new Error("inputEx.ListField.setValue expected an array, got "+(typeof value));
	   }
	      
	   // Set the values (and add the lines if necessary)
	   for(var i = 0 ; i < value.length ; i++) {
	      if(i == this.subFields.length) {
	         this.addElement(value[i]);
	      }
	      else {
	         this.subFields[i].setValue(value[i], false);
	      }
	   }
	      
	   // Remove additional subFields
	   var additionalElements = this.subFields.length-value.length;
	   if(additionalElements > 0) {
	      for(i = 0 ; i < additionalElements ; i++) { 
	         this.removeElement(value.length);
	      }
	   }
	   
	   inputEx.ListField.superclass.setValue.call(this, value, sendUpdatedEvt);
	}
881269
function insert(val) {
      var l = last.call(this);
      l.replace = l.attribute;
      l.dataKey = val;
      return last.call(this) && this;
    }
855509
def addValue(self, _, value):
    """"""
    if value is not None:
      try:
        self._count += self._dataFormat.getCount(value)
        self._total += self._dataFormat.getValue(value) * self._dataFormat.getCount(value)
      except TypeError:
        self._count += 1
        self._total += value
961297
def add(self, value):
        
        ind = int(self._ind % self.shape)
        self._pos = self._ind % self.shape
        self._values[ind] = value
        if self._ind < self.shape:
            self._ind += 1  # fast fill
        else:
            self._ind += self._splitValue
            self._splitPos += self._splitValue
        self._cached = False
308435
function _fillInputText(element, value, next) {
        var onFilled = chainAndErrorCallback.call(this, null, next);
        var onClear = chainAndErrorCallback.call(this, function () {
            element.type(value || '', onFilled);
        }, onFilled);

        element.clear(onClear);
    }
167496
protected void insertNewKeyValueAt(int i, short key, Container value) {
    extendArray(1);
    System.arraycopy(keys, i, keys, i + 1, size - i);
    keys[i] = key;
    System.arraycopy(values, i, values, i + 1, size - i);
    values[i] = value;
    size++;
  }
626188
function (key, value) {
        assertNotNull(key);

        var index = binarySearch(this.slot.keys, 0, this.slot.size, key, this.slot.comparer.compare);

        if (index >= 0) {
            error(ERROR_DUPLICATE_KEY);
        }

        this.insert(~index, key, value);
    }
912284
def add(self, value):
        ''''''
        return self.cache.update((self.value_pickler.dumps(value),))
7489
private void updateValue(Value value) {
    while (true) {
      Value current = currentValue.get();
      if (value.isNewerThan(current)) {
        if (currentValue.compareAndSet(current, value)) {
          if (current == null || !Objects.equals(current.value(), value.value())) {
            eventListeners.forEach(listener -> listener.event(new ValueDelegateEvent<>(ValueDelegateEvent.Type.UPDATE, decode(value.value()))));
          }
          break;
        }
      } else {
        break;
      }
    }
  }
306071
public boolean add(String inputValue) {
        String value = Normalizer.normalize(inputValue, Normalizer.NORMALIZE_LOWER);
        if (!contains(this.genericValues, value)) {
            addElement(value);
            return true;
        }
        return false;
    }
160558
function () {
        
        var n = this.c[2].textContent;

        if(!isNaN( n )){ 
            this.value = this.numValue( n ); 
            this.update(true); 
        }

        else this.c[2].textContent = this.value;

    }