org.jscience.computing.ai.planning
Class TermCall

java.lang.Object
  extended by org.jscience.computing.ai.planning.CompileTimeObject
      extended by org.jscience.computing.ai.planning.Term
          extended by org.jscience.computing.ai.planning.TermCall

public class TermCall
extends Term

Each call term, both at compile time and at run time, is an instance of this class.


Constructor Summary
TermCall(List argsIn, Calculate calculateIn, java.lang.String funcIn)
          To initialize this call term.
TermCall(List argsIn, java.lang.String funcIn)
          To initialize this call term.
 
Method Summary
 Term bind(Term[] binding)
          To apply a given binding to the list of arguments of the function call.
 boolean equals(Term t)
          Whether or not another term is equivalent to the result of this call term.
 boolean findUnifier(Term t, Term[] binding)
          Find a unifier between the result of this call term and another given term.
 boolean isGround()
          Check the argument list of this call term for variables.
 java.lang.String toCode()
          This function produces Java code to create this call term.
 java.lang.String toString()
          This function is used to print this call term.
 
Methods inherited from class org.jscience.computing.ai.planning.Term
isNil, merge, merge, print
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TermCall

public TermCall(List argsIn,
                java.lang.String funcIn)
To initialize this call term. This constructor is used at compile time.

Parameters:
argsIn - the argument list.
funcIn - the name of the function to be applied.

TermCall

public TermCall(List argsIn,
                Calculate calculateIn,
                java.lang.String funcIn)
To initialize this call term. This constructor is used at run time.

Parameters:
argsIn - the argument list.
calculateIn - the Java implementation of the function to be applied.
funcIn - the name of the function to be applied.
Method Detail

bind

public Term bind(Term[] binding)
To apply a given binding to the list of arguments of the function call.

Specified by:
bind in class Term
Parameters:
binding - DOCUMENT ME!
Returns:
DOCUMENT ME!

equals

public boolean equals(Term t)
Whether or not another term is equivalent to the result of this call term.

Specified by:
equals in class Term
Parameters:
t - DOCUMENT ME!
Returns:
DOCUMENT ME!

findUnifier

public boolean findUnifier(Term t,
                           Term[] binding)
Find a unifier between the result of this call term and another given term.

Specified by:
findUnifier in class Term
Parameters:
t - DOCUMENT ME!
binding - DOCUMENT ME!
Returns:
DOCUMENT ME!

isGround

public boolean isGround()
Check the argument list of this call term for variables.

Specified by:
isGround in class Term
Returns:
DOCUMENT ME!

toCode

public java.lang.String toCode()
This function produces Java code to create this call term.

Specified by:
toCode in class CompileTimeObject
Returns:
DOCUMENT ME!

toString

public java.lang.String toString()
This function is used to print this call term.

Specified by:
toString in class Term
Returns:
DOCUMENT ME!