Raptor.LogicParser.Formula
Class SkTerm

java.lang.Object
  extended by Raptor.LogicParser.Formula.Term
      extended by Raptor.LogicParser.Formula.SkTerm
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class SkTerm
extends Term

The SkTerm term. Extends abstract class Term.

See Also:
Serialized Form

Constructor Summary
SkTerm(java.lang.String pName)
          Constructs an SkTerm.
 
Method Summary
 void addToSignature(PanSignature pSignature)
          This method adds this Term to the passed PanSignature IF it is not already in the signature.
 java.lang.String clashes(PanSignature pSignature)
          Returns a String of error message if this Term clashes with the passed PanSignature.
A Term clashes with a PanSignature if it clashes with any of its Predicates,Constants,Functions or Variables.
If this Term does not clash with the Signature, it is added to the signature and an empty String is returned.
 Term clone()
          Returns a copy(clone) of this Term.
 java.lang.String display()
          Returns a String to display the Term.
 boolean equals(Term pTerm)
          Returns true if this Term is equal to the passed Term.
 java.lang.String getName()
          Returns the name of the Term.
 boolean isIn(PanSignature pSignature)
          Returns true if this Term is in the passed PanSignature.
 boolean isInList(java.util.List<SimpleTerm> pList)
          returns true if this Term is in the passed list of Simple Terms.
 Term regenerate()
          Returns a copy of a SkTerm for undo record
 void setVars(Var pVar)
          This method adds Var v to the list of variables this Term is bound to.
 Term sub(Term pTermX, Term pTermY)
          Substitutes all the occurences of Term x by Term y.
 
Methods inherited from class Raptor.LogicParser.Formula.Term
concatNoDup, getVars, isIn, isInVars
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkTerm

public SkTerm(java.lang.String pName)
Constructs an SkTerm.

Parameters:
pName - the String name of the SkTerm.
Method Detail

sub

public Term sub(Term pTermX,
                Term pTermY)
Substitutes all the occurences of Term x by Term y.

Specified by:
sub in class Term
Parameters:
pTermX - represents the Term to be substituted.
pTermY - represents the Term used to substitute the Term x

isIn

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

Specified by:
isIn in class Term
Parameters:
pSignature - PanSignature represents the signature it is to be searched in.

display

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

Specified by:
display in class Term

clone

public Term clone()
Returns a copy(clone) of this Term.

Specified by:
clone in class Term

clashes

public java.lang.String clashes(PanSignature pSignature)
Returns a String of error message if this Term clashes with the passed PanSignature.
A Term clashes with a PanSignature if it clashes with any of its Predicates,Constants,Functions or Variables.
If this Term does not clash with the Signature, it is added to the signature and an empty String is returned.

Specified by:
clashes in class Term
Parameters:
pSignature - PanSignature Represents the signature to be compared against.

getName

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

Specified by:
getName in class Term

setVars

public void setVars(Var pVar)
This method adds Var v to the list of variables this Term is bound to.

Specified by:
setVars in class Term
Parameters:
pVar - Var represents the Var to be added to the list of this Term's variables.

addToSignature

public void addToSignature(PanSignature pSignature)
This method adds this Term to the passed PanSignature IF it is not already in the signature.

Specified by:
addToSignature in class Term
Parameters:
pSignature - PanSignature represents the signature to add this Formula to.

equals

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

Overrides:
equals in class Term
Parameters:
pTerm - Term represents the Term to compare this Term against.

isInList

public boolean isInList(java.util.List<SimpleTerm> pList)
returns true if this Term is in the passed list of Simple Terms.

Parameters:
pList - List represents the list in which this term is to be searched for.

regenerate

public Term regenerate()
Returns a copy of a SkTerm for undo record