static long getPreviousPageNumber(long curPageNumber, SearchTaskOptions options) {
    if (options.searchForwardDirection) {
      return curPageNumber - 1;
    }
    else {
      return curPageNumber + 1;
    }
  }
static long getPreviousPageNumber(long curPageNumber, SearchTaskOptions options)