org.xmloperator.lambda2.term.impl
Class Abstraction0Impl

java.lang.Object
  extended byorg.xmloperator.lambda2.term.impl.TermImpl
      extended byorg.xmloperator.lambda2.term.impl.Abstraction0Impl
All Implemented Interfaces:
Abstraction, Term
Direct Known Subclasses:
Abstraction1Impl, AbstractionNImpl

public class Abstraction0Impl
extends TermImpl
implements Abstraction

Zero or more variable Abstraction implementation.


Field Summary
 
Fields inherited from interface org.xmloperator.lambda2.term.model.Term
TYPE_ABSTRACTION, TYPE_APPLICATION, TYPE_VARIABLE
 
Constructor Summary
Abstraction0Impl(TermImpl body)
           
 
Method Summary
 Term getBody()
          Returns the body of this Abstraction.
 Variable getBoundVariable(int index)
          Returns the bound Variable of this Abstraction, with the given index.
 int getBoundVariableCount()
          Returns the count of linear bound variables of this Abstraction.
 int getTermType()
          Returns the type of this term.
 boolean isAbstraction()
          Returns true if this Term is an Abstraction.
 
Methods inherited from class org.xmloperator.lambda2.term.impl.TermImpl
buildAbstraction, buildAbstraction, buildAbstraction, buildApplication, buildApplication, freeVariables, isApplication, isVariable, toString, toText
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xmloperator.lambda2.term.model.Term
buildAbstraction, buildAbstraction, buildAbstraction, buildApplication, buildApplication, freeVariables, isApplication, isVariable, toText
 

Constructor Detail

Abstraction0Impl

public Abstraction0Impl(TermImpl body)
Method Detail

getTermType

public final int getTermType()
Description copied from interface: Term
Returns the type of this term.

Specified by:
getTermType in interface Term
Returns:
the type of this term. It is one of the constants TYPE_*

isAbstraction

public final boolean isAbstraction()
Description copied from interface: Term
Returns true if this Term is an Abstraction.

Specified by:
isAbstraction in interface Term
Overrides:
isAbstraction in class TermImpl

getBody

public final Term getBody()
Description copied from interface: Abstraction
Returns the body of this Abstraction.

Specified by:
getBody in interface Abstraction
Returns:
the body of this Abstraction.

getBoundVariableCount

public int getBoundVariableCount()
Description copied from interface: Abstraction
Returns the count of linear bound variables of this Abstraction.

Specified by:
getBoundVariableCount in interface Abstraction
Returns:
the count of linear bound variables of this Abstraction.

getBoundVariable

public Variable getBoundVariable(int index)
Description copied from interface: Abstraction
Returns the bound Variable of this Abstraction, with the given index.

Specified by:
getBoundVariable in interface Abstraction
Parameters:
index - an index between 0 and boundVariableCount -1.
Returns:
the bound Variable of this Abstraction, with the given index.