public abstract class NodePattern<T>
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
NodePattern.AnyNodePattern<T>
Matches any node
|
static class |
NodePattern.ConjNodePattern<T>
Given a list of patterns p1,...,pn, matches if all patterns p1,...,pn matches
|
static class |
NodePattern.DisjNodePattern<T>
Given a list of patterns p1,...,pn, matches if one of the patterns p1,...,pn matches
|
static class |
NodePattern.EqualsNodePattern<T>
Matches a constant value of type T using equals()
|
static class |
NodePattern.NegateNodePattern<T>
Given a node pattern p, a node x matches if p does not match x
|
Modifier and Type | Field and Description |
---|---|
static NodePattern |
ANY_NODE |
static int |
CASE_INSENSITIVE |
static int |
NORMALIZE |
static int |
UNICODE_CASE |
Constructor and Description |
---|
NodePattern() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
match(T node)
Returns true if the input node matches this pattern
|
java.lang.Object |
matchWithResult(T node)
Returns result associated with the match
|
public static final NodePattern ANY_NODE
public static final int CASE_INSENSITIVE
public static final int NORMALIZE
public static final int UNICODE_CASE
public abstract boolean match(T node)
node
- - node to matchpublic java.lang.Object matchWithResult(T node)
node
- node to match