Raptor.ProgramParser.Statements
Class PArray

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

public class PArray
extends PTerm

A program array term.
Extends abstract class PTerm.

See Also:
Serialized Form

Constructor Summary
PArray()
          Constructs a new PArray
PArray(java.lang.String pName, int pParams)
           
PArray(java.lang.String pName, java.util.Vector<PTerm> pParams)
          Constructs a new PArray.
 
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(PVar pPVar)
           
 boolean clashes(Var pVar)
           
 java.lang.String display()
          Returns a String to display the parray term.
 boolean equals(PTerm pTerm)
          Returns true if the passed Term is equal to this Term.
 int getDimension()
          Returns the dimension of the PArray
 java.lang.String getName()
          Returns the name of the array
 java.util.Vector<PTerm> getParams()
          Returns the parameters of the PArray
 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)
          Set the name of the array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PArray

public PArray()
Constructs a new PArray


PArray

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

Parameters:
pName - the name of the array
pParams - the parameters of the array

PArray

public PArray(java.lang.String pName,
              int pParams)
Method Detail

getName

public java.lang.String getName()
Returns the name of the array

Overrides:
getName in class PTerm

setName

public void setName(java.lang.String pName)
Set the name of the array

Overrides:
setName in class PTerm

display

public java.lang.String display()
Returns a String to display the parray 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(PVar pPVar)

clashes

public boolean clashes(Atom pAtom)

clashes

public boolean clashes(Function pFunction)

clashes

public boolean clashes(Var pVar)

getParams

public java.util.Vector<PTerm> getParams()
Returns the parameters of the PArray


getDimension

public int getDimension()
Returns the dimension of the PArray