org.xmloperator.lambda.tree.model
Interface TermFactory


public interface TermFactory

Factory of Terms. Terms that are no more used can be returned to it. They can be recycled.


Method Summary
 Abstraction createAbstraction()
          Create an Abstraction, with no parent and no body.
 Application createApplication()
          Create an Application, with no parent and no content.
 EndOfScope createEndOfScope()
          Creates a new EndOfScope, with no parent and no body.
 Leaf createLeaf()
          Creates a new Leaf, with no parent.
 TermStack createTermStack(boolean acceptNull)
          Creates and returns a TermStack.
 

Method Detail

createLeaf

public Leaf createLeaf()
Creates a new Leaf, with no parent.

Returns:
the created Leaf.

createEndOfScope

public EndOfScope createEndOfScope()
Creates a new EndOfScope, with no parent and no body.

Returns:
the created EndOfScope.

createAbstraction

public Abstraction createAbstraction()
Create an Abstraction, with no parent and no body.

Returns:
the created Abstraction.

createApplication

public Application createApplication()
Create an Application, with no parent and no content.

Returns:
the created Application.

createTermStack

public TermStack createTermStack(boolean acceptNull)
Creates and returns a TermStack.

Parameters:
acceptNull - nulls are accepted within the stack only if this argument is true.
Returns:
the created TermStack.