private Candidate newCandidate(S2Cell cell) {
    if (!region.mayIntersect(cell)) {
      return null;
    }

    boolean isTerminal = false;
    if (cell.level() >= minLevel) {
      if (interiorCovering) {
        if (region.contains(cell)) {
          isTerminal = true;
        } else if (cell.level() + levelMod > maxLevel) {
          return null;
        }
      } else {
        if (cell.level() + levelMod > maxLevel || region.contains(cell)) {
          isTerminal = true;
        }
      }
    }
    Candidate candidate = new Candidate();
    candidate.cell = cell;
    candidate.isTerminal = isTerminal;
    if (!isTerminal) {
      candidate.children = new Candidate[1 << maxChildrenShift()];
    }
    candidatesCreatedCounter++;
    return candidate;
  }