com.parctechnologies.eclipse
Class Atom

java.lang.Object
  extended by com.parctechnologies.eclipse.AbstractCompoundTerm
      extended by com.parctechnologies.eclipse.Atom
All Implemented Interfaces:
CompoundTerm

public class Atom
extends AbstractCompoundTerm
implements CompoundTerm

An ECLiPSe atom. Although atoms are not strictly compound terms, this class implements the CompoundTerm interface (it has 0 arguments), so it can be passed to and returned by rpc methods.

See Also:
CompoundTerm

Constructor Summary
Atom(java.lang.String functor)
          Create an Atom given its functor as a String.
 
Method Summary
 java.lang.Object arg(int i)
          This always throws an IndexOutOfBoundsException since the Atom has no arguments.
 java.lang.String toString()
           
 
Methods inherited from class com.parctechnologies.eclipse.AbstractCompoundTerm
arity, equals, functor, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.parctechnologies.eclipse.CompoundTerm
arity, functor
 

Constructor Detail

Atom

public Atom(java.lang.String functor)
Create an Atom given its functor as a String.

Method Detail

arg

public java.lang.Object arg(int i)
This always throws an IndexOutOfBoundsException since the Atom has no arguments. Note that a "throws" clause in the CompoundTerm interface is unnecessary since this is RuntimeException.

Specified by:
arg in interface CompoundTerm
Parameters:
i - may vary between 1 and arity()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object