|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPandora.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 signature)
This method adds this Term to the passed PanSignature IF it is not already in the signature |
abstract java.lang.String |
clashes(PanSignature signature)
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> terms)
This method removes the duplicates from the Term list. |
abstract java.lang.String |
display()
Returns a String to display the Term. |
boolean |
equals(Term t)
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 varibles this Term is bound to. |
boolean |
isIn(java.util.List<Term> terms)
Returns true if this term is in the passed List |
abstract boolean |
isIn(PanSignature signature)
Returns true if this Term is in the passed PanSignature |
boolean |
isInVars(java.util.List<Var> vars)
Returns true if this Term is in the passed List. |
abstract void |
setVars(Var v)
This method adds Var v to the list of variables this Term is bound to. |
abstract Term |
sub(Term x,
Term y)
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 x, Term y)
x
- represents the Term to be substituted.y
- represents the Term used to substitute the Term xpublic abstract boolean isIn(PanSignature signature)
signature
- PanSignature represents the signature it is to be searched in.public boolean equals(Term t)
t
- 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 signature)
signature
- PanSignature Represents the signature to be compared against.public abstract java.lang.String getName()
public abstract void setVars(Var v)
v
- Var represents the Var to be added to the list of this Term's variables.public abstract void addToSignature(PanSignature signature)
signature
- PanSignature represents the signature to add this Formula to.public java.util.List<Term> concatNoDup(java.util.List<Term> terms)
public boolean isIn(java.util.List<Term> terms)
terms
- Listpublic boolean isInVars(java.util.List<Var> vars)
vars
- 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 |