/*
 * Copyright 2006-2020 The MZmine Development Team
 *
 * This file is part of MZmine.
 *
 * MZmine is free software; you can redistribute it and/or modify it under the terms of the GNU
 * General Public License as published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * MZmine is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 * Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with MZmine; if not,
 * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
 * USA
 */

package io.github.mzmine.parameters;

import io.github.mzmine.parameters.impl.IonMobilitySupport;
import io.github.mzmine.util.ExitCode;
import java.util.Collection;
import org.w3c.dom.Element;

/**
 * This class represents a general parameter set of a module. Typical module will use a
 * SimpleParameterSet instance.
 *
 * @param <T>
 */
public interface ParameterSet extends ParameterContainer {

  public Parameter<?>[] getParameters();

  public <T extends Parameter<?>> T getParameter(T parameter);

  public void loadValuesFromXML(Element element);

  public void saveValuesToXML(Element element);

  public boolean checkParameterValues(Collection<String> errorMessages);

  public ParameterSet cloneParameterSet();

  /**
   * This method specifies the fitness of a module to process data acquired on a ion mobility
   * spectrometry (IMS)-mass spectrometer. The default implementation returns {@link
   * IonMobilitySupport#UNTESTED}. However, overriding this method is encouraged to clarify it's
   * fitness for ion mobility data, even if it will still return {@link
   * IonMobilitySupport#UNTESTED}.
   *
   * @return
   */
  default IonMobilitySupport getIonMobilitySupport() {
    return IonMobilitySupport.UNTESTED;
  }

  /**
   * Represent method's parameters and their values in human-readable format
   */
  @Override
  public String toString();

  public ExitCode showSetupDialog(boolean valueCheckRequired);

}

@@ -1100,25 +1100,8 @@
 ce.%0A
- *%0A * @param %3CT%3E%0A
  */%0A
@@ -2191,10 +2191,292 @@
 ired);%0A%0A
+  /**%0A   * Set the value of a parameter%0A   *%0A   * @param parameter the parameter to change%0A   * @param value     the new value%0A   * @param %3CT%3E       Value type%0A   */%0A  default %3CT%3E void setParameter(Parameter%3CT%3E parameter, T value) %7B%0A    getParameter(parameter).setValue(value);%0A  %7D%0A
 %7D%0A

Set parameter in ParameterSet directly