edu.stanford.nlp.ling.tokensregex
Class CoreMapNodePattern.StringAnnotationRegexPattern

java.lang.Object
  extended by edu.stanford.nlp.ling.tokensregex.NodePattern<java.lang.String>
      extended by edu.stanford.nlp.ling.tokensregex.CoreMapNodePattern.StringAnnotationRegexPattern
Enclosing class:
CoreMapNodePattern

public static class CoreMapNodePattern.StringAnnotationRegexPattern
extends NodePattern<java.lang.String>


Nested Class Summary
 
Nested classes/interfaces inherited from class edu.stanford.nlp.ling.tokensregex.NodePattern
NodePattern.AnyNodePattern<T>, NodePattern.ConjNodePattern<T>, NodePattern.DisjNodePattern<T>, NodePattern.EqualsNodePattern<T>, NodePattern.NegateNodePattern<T>
 
Field Summary
 
Fields inherited from class edu.stanford.nlp.ling.tokensregex.NodePattern
ANY_NODE
 
Constructor Summary
CoreMapNodePattern.StringAnnotationRegexPattern(java.util.regex.Pattern pattern)
           
CoreMapNodePattern.StringAnnotationRegexPattern(java.lang.String regex, int flags)
           
 
Method Summary
 java.util.regex.Pattern getPattern()
           
 boolean match(java.lang.String str)
          Returns true if the input node matches this pattern
 java.util.regex.Matcher matcher(java.lang.String str)
           
 java.lang.Object matchWithResult(java.lang.String str)
          Returns result associated with the match
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoreMapNodePattern.StringAnnotationRegexPattern

public CoreMapNodePattern.StringAnnotationRegexPattern(java.util.regex.Pattern pattern)

CoreMapNodePattern.StringAnnotationRegexPattern

public CoreMapNodePattern.StringAnnotationRegexPattern(java.lang.String regex,
                                                       int flags)
Method Detail

getPattern

public java.util.regex.Pattern getPattern()

matcher

public java.util.regex.Matcher matcher(java.lang.String str)

match

public boolean match(java.lang.String str)
Description copied from class: NodePattern
Returns true if the input node matches this pattern

Specified by:
match in class NodePattern<java.lang.String>
Parameters:
str - - node to match
Returns:
true if the node matches the pattern, false otherwise

matchWithResult

public java.lang.Object matchWithResult(java.lang.String str)
Description copied from class: NodePattern
Returns result associated with the match

Overrides:
matchWithResult in class NodePattern<java.lang.String>
Parameters:
str - node to match
Returns:
null if not matched, TRUE if there is a match but no other result associated with the match. Any other value is treated as the result value of the match.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Stanford NLP Group