Class NfaMatcher<T>


  • public class NfaMatcher<T>
    extends java.lang.Object
    NFA implementation. See https://swtch.com/~rsc/regexp/regexp1.html
    • Constructor Summary

      Constructors 
      Constructor Description
      NfaMatcher​(java.lang.String regexp, java.util.function.BiFunction<T,​java.lang.String,​java.lang.Boolean> matcher)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void compile()  
      boolean match​(java.util.List<T> args)  
      java.util.Set<java.lang.String> matchPartial​(java.util.List<T> args)
      Returns the list of possible matcher names for the next object
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NfaMatcher

        public NfaMatcher​(java.lang.String regexp,
                          java.util.function.BiFunction<T,​java.lang.String,​java.lang.Boolean> matcher)
    • Method Detail

      • compile

        public void compile()
      • match

        public boolean match​(java.util.List<T> args)
      • matchPartial

        public java.util.Set<java.lang.String> matchPartial​(java.util.List<T> args)
        Returns the list of possible matcher names for the next object
        Parameters:
        args - input list
        Returns:
        the list of possible matcher names for the next object