|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectPandora.LogicParser.Formula.Term
Pandora.LogicParser.Formula.Function
public class Function
The Function Term.
Extends abstract class Term.
| Constructor Summary | |
|---|---|
Function(java.lang.String name,
java.util.Vector<Term> params)
Constructs a Function Term. |
|
| Method Summary | |
|---|---|
void |
addToSignature(PanSignature signature)
This method adds this Function to the Function List and its Terms to the passed PanSignature IF it is not already in the signature. |
boolean |
clashes(Atom a)
Returns true if the passed Atom clashes with this Function An Atom clashes with a Function if they have the same name. |
java.lang.String |
clashes(PanSignature signature)
Returns a String of error message if this Function clashes with the passed PanSignature A Function clashes with a PanSignature if it clashes with any of its Predicates,Constants, Functions or Variables. If this Function does not clash with the Signature, the Function is added to the Function list of the signature and an empty String is returned. |
boolean |
clashes(Term t)
Returns true if the passed Term(Constant/Function/Variable) clashes with this Function A Function clashes with a Term if they have the same name. Two Functions clash if they have the same name but different arities. |
Function |
clone()
Returns a copy(clone) of this Function. |
java.lang.String |
display()
Returns the String to display the Function term. |
boolean |
equals(Term t)
Returns true if the passed Function is equal to this Function Two Functions are equal if they have the same name,same arity and the same parameters in the same order. |
boolean |
equivalent(Function f)
Returns true if the passed Function is equal to this Function Two Functions are equal if they have the same name,same arity and the same parameters in the same order. |
int |
getArity()
Returns the arity of the Function. |
java.lang.String |
getName()
Returns the name of the Function. |
java.util.Vector<Term> |
getParams()
Returns the list of parameters of the Function. |
java.util.List<Term> |
getTerms()
This method returns a list |
boolean |
isIn(PanSignature signature)
Returns true if this Function is in the Function list of the passed PanSignature |
boolean |
paramsEqual(Function f)
Returns true if the passed Function has the same parameters as this Function. |
void |
setVars(Var v)
This method adds Var v to the list of variables this Function is bound to. |
Term |
sub(Term x,
Term y)
Substitutes all the occurences of Term x by Term y. |
| Methods inherited from class Pandora.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 Function(java.lang.String name,
java.util.Vector<Term> params)
name - String of the name fo the function| Method Detail |
|---|
public java.lang.String getName()
getName in class Termpublic int getArity()
public java.util.Vector<Term> getParams()
public java.lang.String display()
display in class Termpublic boolean equals(Term t)
equals in class Termt - Term represents the term it is to be compared against.public boolean paramsEqual(Function f)
f - Function represents the function which is to compare its parameters against.
public Term sub(Term x,
Term y)
sub in class Termx - represents the Term to be substituted.y - represents the Term used to substitute the Term xpublic Function clone()
clone in class Termpublic boolean clashes(Atom a)
a - Atom represents the Atom to be compared against.public boolean clashes(Term t)
t - Term Represents the Term to be compared against.public java.lang.String clashes(PanSignature signature)
clashes in class Termsignature - PanSignature Represents the signature to be compared against.public boolean equivalent(Function f)
f - Function represents the Function it is to be compared against.public boolean isIn(PanSignature signature)
isIn in class Termsignature - PanSignature represents the signature it is to be searched in.public void setVars(Var v)
setVars in class Termv - Var represents the Var to be added to the list of this Function's variables.public void addToSignature(PanSignature signature)
addToSignature in class Termsignature - PanSignature represents the signature to add this Formula to.public java.util.List<Term> getTerms()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||