Jet.Pat
Class StringExpression

java.lang.Object
  extended byJet.Pat.StringExpression

public class StringExpression
extends java.lang.Object

a sequence of strings and variables, used as the argument to the "print" and "write" actions.


Constructor Summary
StringExpression(java.io.StreamTokenizer tok)
          creates a new StringExpression from the input read by StreamTokenizer tok, which should consist of a sequence of strings and variable names, separated by "+".
 
Method Summary
 java.lang.String evaluate(Document doc, PatternApplication patap)
          evaluates the StringExpression at the time when print or write action is performed.
 java.lang.String toString()
          produces a printable form of the StringExpression, consisting of the elements of the expression, separated by "+".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringExpression

public StringExpression(java.io.StreamTokenizer tok)
                 throws java.io.IOException,
                        PatternSyntaxError
creates a new StringExpression from the input read by StreamTokenizer tok, which should consist of a sequence of strings and variable names, separated by "+".

Method Detail

evaluate

public java.lang.String evaluate(Document doc,
                                 PatternApplication patap)
evaluates the StringExpression at the time when print or write action is performed. Returns the concatenation of the elements of the StringExpression. The value of each variable element should be a Span or Annotation, and is interpreted as the text subsumed by the Span or Annotation.


toString

public java.lang.String toString()
produces a printable form of the StringExpression, consisting of the elements of the expression, separated by "+".