org.xmloperator.lambda.tree.model
Interface TermWithBody

All Superinterfaces:
Term
All Known Subinterfaces:
Abstraction, Application, EndOfScope

public interface TermWithBody
extends Term

Term with body. This is either an EndOfScope, an Abstraction or an Application.


Field Summary
 
Fields inherited from interface org.xmloperator.lambda.tree.model.Term
TYPE_ABSTRACTION, TYPE_APPLICATION, TYPE_ENDOFSCOPE, TYPE_LEAF
 
Method Summary
 void clearBody()
          Clear the body of this Term.
 Term getBody()
          Returns the body of this Term.
 void setBody(Term body)
          Set the body of this Term.
 
Methods inherited from interface org.xmloperator.lambda.tree.model.Term
canBeReturnedToFactory, getFactory, getParent, getType, isAbstraction, isApplication, isEndOfScope, isLeaf, returnToFactory
 

Method Detail

getBody

public Term getBody()
Returns the body of this Term. The body of an Application is its function.

Returns:
the body of this Term.

setBody

public void setBody(Term body)
Set the body of this Term. The body of an Application is its function.

Parameters:
body - a Term.
Throws:
java.lang.IllegalArgumentException - if the given Term is null or has already a parent.
IllegalCastException - if the implementation of the body is not compatible with the implementation of this Term.
ReturnedToTheFactoryException - if this Term has been returned to the factory.

clearBody

public void clearBody()
Clear the body of this Term.