docs: private Term getMaxTerm(int i) {
          Term maxTerm = terms[i];
          if (maxTerm == null) {
              return null;
          }
          Term term = maxTerm;
          while ((term = term.next()) != null) {
              maxTerm = term;
          }
          return maxTerm;
      }