Class NFACompiler

    • Constructor Detail

      • NFACompiler

        public NFACompiler()
    • Method Detail

      • compileFactory

        public static <T> NFACompiler.NFAFactory<T> compileFactory​(Pattern<T,​?> pattern,
                                                                   boolean timeoutHandling)
        Compiles the given pattern into a NFACompiler.NFAFactory. The NFA factory can be used to create multiple NFAs.
        Type Parameters:
        T - Type of the input events
        Parameters:
        pattern - Definition of sequence pattern
        timeoutHandling - True if the NFA shall return timed out event patterns
        Returns:
        Factory for NFAs corresponding to the given pattern
      • canProduceEmptyMatches

        public static boolean canProduceEmptyMatches​(Pattern<?,​?> pattern)
        Verifies if the provided pattern can possibly generate empty match. Example of patterns that can possibly generate empty matches are: A*, A?, A* B? etc.
        Parameters:
        pattern - pattern to check
        Returns:
        true if empty match could potentially match the pattern, false otherwise