Package org.openl.rules.cmatch.algorithm
Class MatchAlgorithmFactory
- java.lang.Object
-
- org.openl.rules.cmatch.algorithm.MatchAlgorithmFactory
-
public class MatchAlgorithmFactory extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IMatchAlgorithmCompilergetAlgorithm(String nameOfAlgorithm)Get compiler for algorithm by its name.static Collection<String>getAlgorithmNames()List all valid algorithm names.static IMatchAlgorithmCompilerBuildergetDefaultBuilder()static voidregisterBuilder(String nameOfAlgorithm, IMatchAlgorithmCompilerBuilder builder)Register algorithm compiler builder for specified algorithm name.static voidsetDefaultBuilder(IMatchAlgorithmCompilerBuilder builder)
-
-
-
Method Detail
-
getAlgorithm
public static IMatchAlgorithmCompiler getAlgorithm(String nameOfAlgorithm)
Get compiler for algorithm by its name.You can pass null as nameOfAlgorithm to get compiler for default algorithm. But default algorithm may be undefined.
- Parameters:
nameOfAlgorithm- name of algorithm- Returns:
- compiler for algorithm
- Throws:
IllegalArgumentException- if no algorithm is registered for that name
-
getAlgorithmNames
public static Collection<String> getAlgorithmNames()
List all valid algorithm names.- Returns:
- collection of names
-
getDefaultBuilder
public static IMatchAlgorithmCompilerBuilder getDefaultBuilder()
-
registerBuilder
public static void registerBuilder(String nameOfAlgorithm, IMatchAlgorithmCompilerBuilder builder)
Register algorithm compiler builder for specified algorithm name.Note that if builder for such name was registered already it will be overwritten.
- Parameters:
nameOfAlgorithm- algorithm namebuilder- compiler builder for algorithm
-
setDefaultBuilder
public static void setDefaultBuilder(IMatchAlgorithmCompilerBuilder builder)
-
-