|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectRaptor.LogicParser.Formula.Term
public abstract class Term
This abstract class is the superclass of all classes that represent a term in
Pnadora
As in Pandora we use first order predicate logic a term can be:
Constructor Summary | |
---|---|
Term()
|
Method Summary | |
---|---|
abstract void |
addToSignature(PanSignature pSignature)
This method adds this Term to the passed PanSignature IF it is not already in the signature. |
abstract 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. |
abstract Term |
clone()
Returns a copy(clone) of this Term. |
java.util.List<Term> |
concatNoDup(java.util.List<Term> pTerms)
This method removes the duplicates from the Term list. |
abstract java.lang.String |
display()
Returns a String to display the Term. |
boolean |
equals(Term pTerm)
Returns true if the passed Term is equal to this Term. |
abstract java.lang.String |
getName()
Returns the name of the Term. |
java.util.List<Var> |
getVars()
Returns the list of all variables this Term is bound to. |
boolean |
isIn(java.util.List<Term> pTerms)
Returns true if this term is in the passed List |
abstract boolean |
isIn(PanSignature pSignature)
Returns true if this Term is in the passed PanSignature. |
boolean |
isInVars(java.util.List<Var> pVars)
Returns true if this Term is in the passed List. |
abstract void |
setVars(Var pVar)
This method adds Var v to the list of variables this Term is bound to. |
abstract Term |
sub(Term pTermX,
Term pTermY)
Substitutes all the occurences of Term x by Term y. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Term()
Method Detail |
---|
public abstract Term sub(Term pTermX, Term pTermY)
pTermX
- represents the Term to be substituted.pTermY
- represents the Term used to substitute the Term xpublic abstract boolean isIn(PanSignature pSignature)
pSignature
- PanSignature represents the signature it is to be searched in.public boolean equals(Term pTerm)
pTerm
- Term represents the Term it is to be compared against.public abstract java.lang.String display()
public abstract Term clone()
clone
in class java.lang.Object
public abstract java.lang.String clashes(PanSignature pSignature)
pSignature
- PanSignature Represents the signature to be compared against.public abstract java.lang.String getName()
public abstract void setVars(Var pVar)
pVar
- Var represents the Var to be added to the list of this Term's
variables.public abstract void addToSignature(PanSignature pSignature)
pSignature
- PanSignature represents the signature to add this Formula to.public java.util.List<Term> concatNoDup(java.util.List<Term> pTerms)
public boolean isIn(java.util.List<Term> pTerms)
pTerms
- Listpublic boolean isInVars(java.util.List<Var> pVars)
pVars
- List represents the List to search for this Term
in.public java.util.List<Var> getVars()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |