code: public void addTermParameterMapping(Integer termIndex,
              List<Integer> parameterValues) {
          if (termIndex == null) {
              throw new InvalidArgument(
                      "The 'termIndex' parameter must not be null.");
          }
  
          if (parameterValues == null) {
              throw new InvalidArgument(
                      "The 'parameterValues' parameter must not be null.");
          }
  
          if (parameterValues.isEmpty()) {
              return;
          }
  
          List<Integer> parameters = termParameterIndex.get(termIndex);
          if (parameters == null) {
              termParameterIndex.put(termIndex, parameterValues);
          } else {
              parameters.addAll(parameterValues);
          }
      }
docs: Adds a mapping of {@code termIndex} to {@code parameterValues} in the
  {@code termParameterIndex} map. A {@code termIndex} will not be indexed
  if the {@code parameterValues} collection is empty.
  
  @param termIndex {@link Integer}, the term index as the key, must not be
  null
  @param parameterValues {@link List} of {@link Integer}, the parameter
  index values, which cannot be null, and if empty the {@code termIndex}
  will not be indexed
  @throws InvalidArgument Thrown if {@code termIndex} or
  {@code parameterValues} is null