/*
Set the value of the last element returned by next or previous,
discarding any version information
2055
public void setValue(E element) {
        if(element == null)
            throw new NullPointerException("cannot set a null element");
        if(_lastId == VStack.NULL_ID)
            throw new IllegalStateException("neither next() nor previous() has been called");

        _stack.setById(_lastId, element);

        afterSet(element);
    }
263141
function setVersion(type, ver) {

  const idx = verMap[type];
  let cur = verArr[idx];
  let next = cur + 1;

  if (isTruthy(ver))
    next = ver;

  if (isTruthy(ver)) {
    verArr[idx] = ver;
  }

  else {
    if (type === 'patch') {
      if (next > maxPatch) {
        // zero current stepping
        // up to minor.
        verArr[idx] = 0;
        return setVersion('minor');
      }
      else {
        verArr[idx] = next;
      }
    }
    else if (type === 'minor') {
      if (next > maxMinor) {
        // zero current stepping
        // up to major.
        verArr[idx] = 0;
        return setVersion('major');
      }
      else {
        verArr[idx] = next;
      }
    }
    else {
      verArr[idx] = next;
    }
  }

}
574811
function (name, value, oldValue) {
                this.$InputElement.onbind.apply(this, arguments);
                if (name === "value") {
                    value = (value != null) ? value + "" : "";
                    if (value) {
                        this._removePlaceholder();
                    }
                    this._domElt.value = value;
                    this._setPlaceholder();
                }
            }
17063
public int lastIndexOf(E object, int to) {
        Object[] snapshot = elements;
        return lastIndexOf(object, snapshot, 0, to);
    }
1365904
function() {

            this.firstElement = null;
            this.lastElement = null;

            var elements = this.getFocusableElements();
            this.focusableElements = elements;

            if (elements.length > 0) {
                this.firstElement = elements[0];
                this.lastElement = elements[elements.length - 1];
            }

            if (this.cfg.getProperty("modal")) {
                this.setTabLoop(this.firstElement, this.lastElement);
            }
        }
721667
public void setEmpty()
    {
        this.value = "";
        this.leading = this.trailing = 0;
        this.isEmpty = true;
        if (this.previous != null)
        {
            this.previous.nextEmpty = true;
        }
        if (this.next != null)
        {
            this.next.prevEmpty = true;
        }
    }
21733
function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
    // convert -0 to +0
    if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;
    var O = toIObject(this);
    var length = toLength(O.length);
    var index = length - 1;
    if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));
    if (index < 0) index = length + index;
    for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;
    return -1;
  }
1071763
function unset(name, element, previous) {
  if (unset.handlers[name]) {
    unset.handlers[name](name, element, previous);
  } else {
    element[name] = null;
  }
}
1004235
function last(newitem) {
    if (newitem) {
      this.mappings.push({});
    }

    var m = this.mappings[this.mappings.length - 1];

    if (m && m.attribute && m.value && m.dataKey && m.replace) {
      m.re = new RegExp(m.attribute + '=([\'"]?)' + m.value + '\\1');
    } else if (m) {
      delete m.re;
    }

    return m;
  }
410940
private void afterSet(E element) {
        switch(_lastCall) {
            case NEXT:
                _previousNode = _stack.getListNode(_lastId);
                break;
            case PREVIOUS:
                _nextNode = _stack.getListNode(_lastId);
                break;
            default:
                throw new IllegalStateException();
        }
    }
930830
function last(array) {

  var n,
    getter,
    args,
    reversed;

  if(!isArray(array)) {
    return array;
  }

  //cuz reverse change our src array
  //and we don't want side effects
  reversed = array.slice();

  args = Array.prototype.slice.call(arguments, 1);
  n = (isNumber(args[0])) ? args[0] : 1;
  getter = (!isNumber(args[0]))  ? args[0] : (!isNumber(args[1])) ? args[1] : undefined;

  return (args.length)
    //send reversed array as arguments, and reverse it back as result
    ? getFirstMatches(reversed.reverse(), n,(getter) ? $parse(getter) : getter).reverse()
    //get the last element
    : reversed[reversed.length-1];
}
604915
function previously(currentValue, partial) {
    var previous = {};
    Object.keys(partial).forEach(function(key) {
        if (isObject(currentValue[key] && partial[key])) {
            previous[key] = previously(currentValue[key], partial[key]);
        } else {
            previous[key] = currentValue[key];
        }
    });
    return previous;
}
657004
public V setValueAt(int index, V value) {
        index = (index << 1) + 1;
        V old = (V)mArray[index];
        mArray[index] = value;
        return old;
    }
1348940
private void notifyListenersIfUninhibited(R oldValue, R newValue) {
        if (inhibited) {
            inhibitCount++;
            lastInhibitedValue = newValue;
        } else {
            lastInhibitedValue = newValue; // Just in case, even though not really necessary
            lastNonInhibitedValue = newValue;
            doNotifyListeners(oldValue, newValue);
        }
    }
648323
def set_last_row_idx(self, last_row_idx):
		'''
		
		'''
		assert last_row_idx >= self._max_row
		self._max_row = last_row_idx
		return self
607447
function last(array) {
      var length = array == null ? 0 : array.length;
      return length ? array[length - 1] : undefined$1;
    }
682104
function() {
    this._unsetLastRow();
    var elTr = this.getLastTrEl();
    if(elTr) {
        // Assign class
        Dom.addClass(elTr, DT.CLASS_LAST);
        this._sLastTrId = elTr.id;
    }
}