Class EsExprMatcher


  • public final class EsExprMatcher
    extends java.lang.Object
    The EsExprMatcher is expression structure matcher for EsExpr. Matches expressions with patterns as-is, i.e. without normalization, respecting expression structure. Uses same Lisp-syntax notation for pattern specification, supports several wildcards: %a matches any atom including NIL, %s matches any S-expression.
    • Constructor Summary

      Constructors 
      Constructor Description
      EsExprMatcher​(java.lang.String pattern)
      Create new matcher for given pattern.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean matches​(EsExpr expr)
      Returns true if given expression matches this matcher.
      • Methods inherited from class java.lang.Object

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

      • EsExprMatcher

        public EsExprMatcher​(java.lang.String pattern)
        Create new matcher for given pattern.
        Parameters:
        pattern - Lisp-syntax S-expression denoting pattern to match
        Throws:
        java.lang.IllegalArgumentException - if pattern is null
    • Method Detail

      • matches

        public boolean matches​(EsExpr expr)
        Returns true if given expression matches this matcher.
        Parameters:
        expr - S-expression to be checked for match
        Returns:
        true if given expression matches
        Throws:
        java.lang.IllegalArgumentException - if e is null