CompoundTerm
Date: 2022-09-03

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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `arg(int i)` Return the argument at position `i`.
    `int` | `arity()` Return the number of arguments.
    `java.lang.String` | `functor()` Return the functor of the compound term.

- - ### Method Detail

    - #### functor

          java.lang.String functor()

      Return the functor of the compound term.

    - #### arity

          int arity()

      Return the number of arguments.

    - #### arg

          java.lang.Object arg(int i)

      Return the argument at position `i`. The returned object will instantiate the Java class/interface representing the corresponding ECLiPSe data type.
      Parameters:
        `i` - may vary between 1 and `arity()`