// Path: src/jmetal/util/Configuration.java
// public class Configuration implements Serializable {
// 
//   /** 
//    * Logger object 
//    */
//   public static Logger logger_ = Logger.getLogger("jMetal");
//     
// } // Configuration
// 
// Path: src/jmetal/util/JMException.java
// public class JMException extends Exception implements Serializable {
//   
//   /**
//    * Constructor
//    * @param Error message
//    */
//   public JMException (String message){
//      super(message);      
//   } // JmetalException
// }


import jmetal.util.JMException;
import java.util.HashMap;
import jmetal.util.Configuration;
//  MutationFactory.java
//
//  Author:
//       Antonio J. Nebro <antonio@lcc.uma.es>
//       Juan J. Durillo <durillo@lcc.uma.es>
//
//  Copyright (c) 2011 Antonio J. Nebro, Juan J. Durillo
//
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU Lesser General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  This program 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 Lesser General Public License for more details.
// 
//  You should have received a copy of the GNU Lesser General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.

package jmetal.operators.mutation;



/**
 * Class implementing a factory for Mutation objects.
 */
public class MutationFactory {

	/**
	 * Gets a crossover operator through its name.
	 * 
	 * @param name
	 *            of the operator
	 * @return the operator
	 * @throws JMException
	 */
	public static Mutation getMutationOperator(String name, HashMap parameters)
			throws JMException {

		if (name.equalsIgnoreCase("PolynomialMutation"))
			return new PolynomialMutation(parameters);
		else if (name.equalsIgnoreCase("BitFlipMutation"))
			return new BitFlipMutation(parameters);
// Path: src/jmetal/util/Configuration.java
// public class Configuration implements Serializable {
// 
//   /** 
//    * Logger object 
//    */
//   public static Logger logger_ = Logger.getLogger("jMetal");
//     
// } // Configuration
// 
// Path: src/jmetal/util/JMException.java
// public class JMException extends Exception implements Serializable {
//   
//   /**
//    * Constructor
//    * @param Error message
//    */
//   public JMException (String message){
//      super(message);      
//   } // JmetalException
// }


// Path: src/jmetal/operators/mutation/MutationFactory.java
import jmetal.util.JMException;
import java.util.HashMap;
import jmetal.util.Configuration;

//  MutationFactory.java
//
//  Author:
//       Antonio J. Nebro <antonio@lcc.uma.es>
//       Juan J. Durillo <durillo@lcc.uma.es>
//
//  Copyright (c) 2011 Antonio J. Nebro, Juan J. Durillo
//
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU Lesser General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  This program 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 Lesser General Public License for more details.
// 
//  You should have received a copy of the GNU Lesser General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.

package jmetal.operators.mutation;



/**
 * Class implementing a factory for Mutation objects.
 */
public class MutationFactory {

	/**
	 * Gets a crossover operator through its name.
	 * 
	 * @param name
	 *            of the operator
	 * @return the operator
	 * @throws JMException
	 */
	public static Mutation getMutationOperator(String name, HashMap parameters)
			throws JMException {

		if (name.equalsIgnoreCase("PolynomialMutation"))
			return new PolynomialMutation(parameters);
		else if (name.equalsIgnoreCase("BitFlipMutation"))
			return new BitFlipMutation(parameters);
		else if (name.equalsIgnoreCase("NonUniformMutation"))