update(componentId, actionNameToKeyMap, actionNameToHandlersMap, options) {
    /**
     * We record whether we're building new options for the component that currently
     * has the longest sequence, to decide whether we need to recalculate the longest
     * sequence.
     */
    const isUpdatingLongestSequenceComponent =
      this._isUpdatingComponentWithLongestSequence(componentId);

    const longestSequenceBefore = this.longestSequence;

    const componentOptions = this._build(
      componentId, actionNameToKeyMap, actionNameToHandlersMap, options
    );

    if (isUpdatingLongestSequenceComponent &&
      componentOptions.sequenceLength !== longestSequenceBefore) {
      /**
       * Component with the longest sequence has just had new options registered
       * so we need to reset the longest sequence
       */
      if (componentOptions.sequenceLength > longestSequenceBefore) {
        /**
         * The same component has registered a longer sequence, so we just
         * need to update the sequence length to the new, larger number
         */
        this.longestSequence = componentOptions.sequenceLength;
      } else {
        /**
         * The component may no longer have the longest sequence, so we need to
         * recalculate
         */
        this._recalculateLongestSequence();
      }
    }

    this._list[this.getPositionById(componentId)] = componentOptions;
  }
Replaces the options of a component already in the list with new values
@param {ComponentId} componentId - Id of the component to replace the options of
@param {KeyMap} actionNameToKeyMap - Map of actions to key maps
@param {HandlersMap} actionNameToHandlersMap - Map of actions to handlers
@param {Object} options - Hash of options that configure how the key map is built.
@param {string} options.defaultKeyEvent - The default key event to use for any
       action that does not explicitly define one.
@returns {number} The position the component options have in the list