Raptor.ProgramParser.Statements
Class While

java.lang.Object
  extended by Raptor.ProgramParser.Statements.Instruction
      extended by Raptor.ProgramParser.Statements.While
All Implemented Interfaces:
java.io.Serializable

public class While
extends Instruction

A while instruction.
Extends abstract Instruction class.

See Also:
Serialized Form

Constructor Summary
While(Formula pCondition, Statements pCode)
          Constructs a new While instruction.
 
Method Summary
 java.lang.String clashes(PanSignature pSignature)
          Returns a String containing an Error character if this Formula clashes with the passed PanSignature, Otherwise it will return an Empty String ""
An While Statement clashes with a signature if any of its condition or code clash with the signature.
 java.lang.String display()
          Returns a String to display the num term.
 Statements getCode()
          Returns the code for the contents of the while loop.
 Formula getCondition()
          Returns the boolean condition of the while instruction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

While

public While(Formula pCondition,
             Statements pCode)
Constructs a new While instruction.

Parameters:
pCondition - the boolean condition formula of the while instruction
pCode - the code for the contents of the while loop
Method Detail

getCondition

public Formula getCondition()
Returns the boolean condition of the while instruction.


getCode

public Statements getCode()
Returns the code for the contents of the while loop.


display

public java.lang.String display()
Returns a String to display the num term.

Specified by:
display in class Instruction

clashes

public java.lang.String clashes(PanSignature pSignature)
Returns a String containing an Error character if this Formula clashes with the passed PanSignature, Otherwise it will return an Empty String ""
An While Statement clashes with a signature if any of its condition or code clash with the signature.

Specified by:
clashes in class Instruction
Parameters:
pSignature - PanSignature represents the PanSignature to be checked if this Formula clashes with.