|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectRaptor.LogicParser.Formula.Term
Raptor.LogicParser.Formula.SimpleTerm
public class SimpleTerm
The SimpleTerm (a Constant)
Extends abstract class Term.
Constructor Summary | |
---|---|
SimpleTerm(java.lang.String pName)
Constructs a SimpleTerm(A constant). |
Method Summary | |
---|---|
void |
addToSignature(PanSignature pSignature)
This method adds this SimpleTerm to the Constant List of the passed PanSignature IF it is not already in the signature. |
boolean |
clashes(Atom pAtom)
Returns true if the passed Atom clashes with this SimpleTerm. An Atom clashes with a SimpleTerm if they have the same name. |
java.lang.String |
clashes(PanSignature pSignature)
Returns a String of error message if this SimpleTerm clashes with the passed PanSignature. A SimpleTerm clashes with a PanSignature if it clashes with any of its Predicates,Constants,Functions or Variables. If this SimpleTerm does not clash with the Signature, it is added to the Constant list of the signature and an empty String is returned. |
boolean |
clashes(Term pTerm)
Returns true if the passed Term(Constant/Function/Variable) clashes with this SimpleTerm. A SimpleTerm clashes with a Term if they have the same name. |
SimpleTerm |
clone()
Returns a copy(clone) of this SimpleTerm. |
java.lang.String |
display()
Returns a String to display the SimpleTerm. |
boolean |
equals(Term pTerm)
Returns true if the passed Term is equal to this SimpleTerm. A Term is equal to a SimpleTerm if it is a SimpleTerm and they have the same name. |
java.lang.String |
getName()
Returns the name of the SimpleTerm. |
boolean |
isIn(PanSignature pSignature)
Returns true if this SimpleTerm is in the Constant list of the passed PanSignature. |
Term |
regenerate()
Returns a copy of the SimpleTerm for the undo record |
void |
setVars(Var pVar)
This method adds Var v to the list of variables this SimpleTerm 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 |
---|
public SimpleTerm(java.lang.String pName)
pName
- String of the name fo the SimpleTerm.Method Detail |
---|
public java.lang.String getName()
getName
in class Term
public Term sub(Term pTermX, Term pTermY)
sub
in class Term
pTermX
- represents the Term to be substituted.pTermY
- represents the Term used to substitute the Term xpublic java.lang.String display()
display
in class Term
public boolean equals(Term pTerm)
equals
in class Term
pTerm
- Term represents the Term it is to be compared against.public boolean isIn(PanSignature pSignature)
isIn
in class Term
pSignature
- PanSignature represents the signature it is to be searched in.public SimpleTerm clone()
clone
in class Term
public boolean clashes(Atom pAtom)
pAtom
- Atom represents the Atom to be compared against.public boolean clashes(Term pTerm)
pTerm
- Term Represents the Term to be compared against.public java.lang.String clashes(PanSignature pSignature)
clashes
in class Term
pSignature
- PanSignature Represents the signature to be compared against.public void setVars(Var pVar)
setVars
in class Term
pVar
- Var represents the Var to be added to the list of this
SimpleTerm's variables.public void addToSignature(PanSignature pSignature)
addToSignature
in class Term
pSignature
- PanSignature represents the signature to add this Formula to.public Term regenerate()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |