Interface ParameterFactory<S extends org.uma.jmetal.solution.Solution<?>>
- Type Parameters:
S- The type of solution this factory creates parameters for
- All Known Implementing Classes:
BinaryParameterFactory,DoubleParameterFactory,MOPSOParameterFactory,PermutationParameterFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface ParameterFactory<S extends org.uma.jmetal.solution.Solution<?>>
A factory interface for creating
CategoricalParameter instances specific to different types of solutions.
This interface serves as the base for creating type-safe parameter factories for various solution representations (e.g., binary, permutation, real-valued) in evolutionary algorithms. Implementations of this interface provide concrete parameter creation logic tailored to specific solution types.
Key features:
- Type-safe parameter creation through generics
- Centralized parameter instantiation
- Support for different solution representations
- Flexible configuration through string-based parameter names
Implementations should handle the creation of all necessary parameters for configuring evolutionary algorithm components such as variation operators, selection mechanisms, and archiving strategies.
- Since:
- 1.0
- Author:
- Antonio J. Nebro
-
Method Summary
Modifier and TypeMethodDescriptioncreateParameter(String parameterName, List<String> values) Creates and returns a specificCategoricalParameterinstance based on the provided parameter name.
-
Method Details
-
createParameter
Creates and returns a specificCategoricalParameterinstance based on the provided parameter name.This method serves as a factory for creating different types of parameters used in configuring evolutionary algorithms. The actual type of parameter created depends on the
parameterName.- Parameters:
parameterName- the name of the parameter to create (case-sensitive)values- the list of possible string values for the parameter (must not be null or empty)- Returns:
- an instance of
CategoricalParametercorresponding to the specified parameter name - Throws:
IllegalArgumentException- if the values list is null or empty- See Also:
-