code: public void updateAndClean(ProcessedInput processedInput) {
          // stores list of processed parameter names. all other names should be removed
          List<String> processedParameters = new ArrayList<String>();
  
          if (processedInput.getAmountOfParameters() > 0) {
              String parameterName = null;
  
              for (int i = 0; i < processedInput.getAmountOfParameters(); i++) {
                  parameterName = processedInput.getParameterName(i);
                  processedParameters.add(parameterName);
  
                  this.updateValue(parameterName, processedInput.getSqlParameterValues().get(i));
                  this.updatePosition(parameterName, i);
              }
          }
  
          List<String> removeKeyList = new ArrayList<String>();
  
          for (String key : this.keySet()) {
              if (processedParameters.contains(key) == false) {
                  removeKeyList.add(key);
              }
          }
  
          for (String key : removeKeyList) {
              this.remove(key);
          }
      }
docs: Utility function.
  Updates this instance of Query Parameters with values and positions from
  ProcessedInput.
  <p/>
  This instance of QueryParameters should have at least all keys present in Processed Input. If key is present
  in ProcessedInput but is not present in this instance of QueryParameters - it will be added but ignored. This
  issue might be resolved with using {@link #updateValue(String, Object)}
  <p/>
  All keys which are present in this instance but not present in Processed Input - would be removed.
  
  @param processedInput Processed Input which would be used to update this instance