Raptor.ProgramParser.Statements
Class PVar

java.lang.Object
  extended by Raptor.ProgramParser.Statements.PTerm
      extended by Raptor.ProgramParser.Statements.PVar
All Implemented Interfaces:
java.io.Serializable

public class PVar
extends PTerm

A variable program term.
Extends abstract class PTerm.

See Also:
Serialized Form

Constructor Summary
PVar()
          For XMLEncoder
PVar(java.lang.String pName)
          Constructs a new variable.
 
Method Summary
 boolean clashes(Atom pAtom)
           
 boolean clashes(Function pFunction)
           
 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 ""
A PVar Statement clashes with a signature if any of its parts clash with the signature.
 boolean clashes(PArray pPArray)
           
 boolean clashes(Var pVar)
           
 java.lang.String display()
          Returns a String to display the var term.
 boolean equals(PTerm pTerm)
          Returns true if the passed Term is equal to this Term.
 java.lang.String getName()
           
 int getValue()
          Returns the value associated with this variable.
 boolean isIn(PanSignature pSignature)
          Returns true if this PVar is in the PVar list of the passed PanSignature.
 Term s()
          Creates VVar to replace PVar in the formula where necessary.
 void setName(java.lang.String pName)
          For XMLEncoder
 void setValue(int pValue)
          For XMLEncoder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PVar

public PVar()
For XMLEncoder


PVar

public PVar(java.lang.String pName)
Constructs a new variable.

Parameters:
pName - the name of the variable
Method Detail

getValue

public int getValue()
Returns the value associated with this variable.


setValue

public void setValue(int pValue)
For XMLEncoder


getName

public java.lang.String getName()
Overrides:
getName in class PTerm

setName

public void setName(java.lang.String pName)
For XMLEncoder

Overrides:
setName in class PTerm

display

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

Specified by:
display in class PTerm

s

public Term s()
Creates VVar to replace PVar in the formula where necessary. Used in Raptor.

Specified by:
s in class PTerm

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 ""
A PVar Statement clashes with a signature if any of its parts clash with the signature.

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

isIn

public boolean isIn(PanSignature pSignature)
Returns true if this PVar is in the PVar list of the passed PanSignature.

Parameters:
pSignature - PanSignature represents the signature it is to be searched in.

equals

public boolean equals(PTerm pTerm)
Returns true if the passed Term is equal to this Term.

Parameters:
pTerm - Term represents the Term it is to be compared against.

clashes

public boolean clashes(PArray pPArray)

clashes

public boolean clashes(Atom pAtom)

clashes

public boolean clashes(Function pFunction)

clashes

public boolean clashes(Var pVar)