code: static void requireNotMultiValued(final Set<String> parametersToCheck, final Map parameterMap) {
  
          for (final String parameterName : parametersToCheck) {
              if (parameterMap.containsKey(parameterName)) {
                  final String[] values = (String[]) parameterMap.get(parameterName);
                  if (values.length > 1) {
                      throw new IllegalStateException(
                              "Parameter ["
                                      + parameterName
                                      + "] had multiple values ["
                                      + Arrays.toString(values)
                                      + "] but at most one value is allowable.");
                  }
              }
          }
      }
docs: For each parameter to check, verify that it has zero or one value.
  
  <p>The Set of parameters to check MAY be empty. The parameter map MAY NOT contain any given
  parameter to check.
  
  <p>This method is an implementation detail and is not exposed API. This method is only
  non-private to allow JUnit testing.
  
  <p>Static, stateless method.
  
  @param parametersToCheck non-null potentially empty Set of String names of parameters
  @param parameterMap non-null Map from String name of parameter to String[] values
  @throws IllegalStateException if a parameterToCheck is present in the parameterMap with
  multiple values.