Class MatchAlgorithmFactory


  • public class MatchAlgorithmFactory
    extends Object
    • 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
      • 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 name
        builder - compiler builder for algorithm