code: protected static boolean addMatchResult(int limit,
                                              List results,
                                              String pattern,
                                              Object value,
                                              int[] positions,
                                              int len)
      {
          int size = results.size();
          if (size < limit) {
              if (positions == null || len == 0) {
                  positions = NO_POSITIONS;
              }
              else {
                  int[] original = positions;
                  positions = new int[len];
                  for (int i=0; i<len; i++) {
                      positions[i] = original[i];
                  }
              }
              results.add(new Result(pattern, value, positions));
              return size + 1 < limit;
          }
          else {
              return false;
          }
      }
docs: Returns false if no more results should be added.