public final class EsExprMatcher
extends java.lang.Object
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 and Description |
---|
EsExprMatcher(java.lang.String pattern)
Create new matcher for given pattern.
|
Modifier and Type | Method and Description |
---|---|
boolean |
matches(EsExpr expr)
Returns
true if given expression matches this matcher. |
public EsExprMatcher(java.lang.String pattern)
pattern
- Lisp-syntax S-expression denoting pattern to matchjava.lang.IllegalArgumentException
- if pattern
is null
public boolean matches(EsExpr expr)
true
if given expression matches this matcher.expr
- S-expression to be checked for matchtrue
if given expression matchesjava.lang.IllegalArgumentException
- if e
is null