Raptor.ProgramParser.Statements
Class Method

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

public class Method
extends PTerm

Creates a method term.
Extends abstract PTerm class.

See Also:
Serialized Form

Constructor Summary
Method(java.lang.String pName, java.util.Vector<PTerm> pParams)
          Constructs a new Method PTerm
 
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 ""
A Method Statement clashes with a signature if any of its parts clash with the signature.
 java.lang.String display()
          Returns the string representing the method call
 boolean equals(Method pStatement)
          Returns true if the passed Term is equal to this Term.
 int getArity()
          Return the arity of the parameters used in the method call
 java.lang.String getName()
          Return the name of the method called
 java.util.Vector<PTerm> getParams()
          Return the parameters of the method call.
 boolean isBool(PVar param, PanSignature pSignature)
           
 boolean isIn(PanSignature pSignature)
          Returns true if this Method is in the Method list of the passed PanSignature.
 Term s()
          Creates VVar to replace PVar in the formula where necessary.
 
Methods inherited from class Raptor.ProgramParser.Statements.PTerm
setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Method

public Method(java.lang.String pName,
              java.util.Vector<PTerm> pParams)
Constructs a new Method PTerm

Parameters:
pName - the name of the method being called
pParams - the parameters of the method call
Method Detail

getParams

public java.util.Vector<PTerm> getParams()
Return the parameters of the method call.


getName

public java.lang.String getName()
Return the name of the method called

Overrides:
getName in class PTerm

getArity

public int getArity()
Return the arity of the parameters used in the method call


display

public java.lang.String display()
Returns the string representing the method call

Specified by:
display in class PTerm

isIn

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

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

equals

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

Parameters:
pStatement - pStatement represents the Statement it is to be compared against.

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 Method 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.

isBool

public boolean isBool(PVar param,
                      PanSignature pSignature)

s

public Term s()
Description copied from class: PTerm
Creates VVar to replace PVar in the formula where necessary. Used in Raptor.

Specified by:
s in class PTerm