constructor(keepOnGoing = undefined) {
    super();
    this.found_ = false;
    this.shouldContinue_ = true;
    this.keepOnGoing_ = keepOnGoing;
  }
@param {boolean=} keepOnGoing Whether to stop searching after the first
    found condition.