Jet.Pat
Class PrintAction

java.lang.Object
  extended byJet.Pat.Action
      extended byJet.Pat.PrintAction

public class PrintAction
extends Action

the encoding of the "print message" action, where message is a StringExpression (one or more strings or variables).


Constructor Summary
PrintAction(java.io.StreamTokenizer tok)
          constructs a new PrintAction by reading from StreamTokenizer tok.
PrintAction(StringExpression message)
          constructs a new PrintAction, given a message
 
Method Summary
 int perform(Document doc, PatternApplication patap)
          performs the "print" action, writing the message to the Console.
 java.lang.String toString()
          returns a printable form of the "print" action, consisting of "print" followed by the elements of the message, separated by "+".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrintAction

public PrintAction(StringExpression message)
constructs a new PrintAction, given a message


PrintAction

public PrintAction(java.io.StreamTokenizer tok)
            throws java.io.IOException,
                   PatternSyntaxError
constructs a new PrintAction by reading from StreamTokenizer tok. The input should be the token "write" (the current token) followed by a StringExpression: one or more strings or variables, separated by "+".

Method Detail

perform

public int perform(Document doc,
                   PatternApplication patap)
performs the "print" action, writing the message to the Console.

Specified by:
perform in class Action

toString

public java.lang.String toString()
returns a printable form of the "print" action, consisting of "print" followed by the elements of the message, separated by "+".

Specified by:
toString in class Action