Package com.parctechnologies.eclipse
Interface CompoundTerm
- All Known Implementing Classes:
AbstractCompoundTerm,Atom,CompoundTermImpl
public interface CompoundTerm
Interface to describe an ECLiPSe compound term.
An object that implements it must be able to supply a functor, an arity,
and arguments. The arguments may be of any Java class which represents an
ECLiPSe data.
Compound terms converted from EXDR format using
EXDRInputStream implement this
interface.
A compound term like p(q(2),a,"b") has functor "p" and arity 3, arg(1) is the term q(2) arg(2) is the term 'a' and arg(3) is the Java String "b".
-
Method Summary
-
Method Details
-
functor
String functor()Return the functor of the compound term. -
arity
int arity()Return the number of arguments. -
arg
Return the argument at positioni. The returned object will instantiate the Java class/interface representing the corresponding ECLiPSe data type.- Parameters:
i- may vary between 1 andarity()
-