Building Parsers with Java

sjm.engine
Class Atom

java.lang.Object
  |
  +--sjm.engine.Structure
        |
        +--sjm.engine.Fact
              |
              +--sjm.engine.Atom
Direct Known Subclasses:
BooleanFact, NumberFact

public class Atom
extends Fact
implements ComparisonTerm

An Atom is a Structure that no terms.

For example, the following structure

     city(denver, 5280);
 
is a fact that contains two atoms, "denver" and 5280.


Fields inherited from class sjm.engine.Fact
resolvent
 
Fields inherited from class sjm.engine.Structure
emptyList, functor, terms
 
Constructor Summary
Atom(java.lang.Object functor)
          Contructs an atom from the specified object.
 
Method Summary
 java.lang.Object eval()
          Returns the functor if this structure.
 
Methods inherited from class sjm.engine.Fact
copyForProof, dynamicAxiom, facts, head, resolvent, unify
 
Methods inherited from class sjm.engine.Structure
arity, canFindNextProof, equals, functorAndArityEquals, headAndTail, isList, list, list, list, listTailString, listTermsToString, terms, toString, unify, unify, unify, variables
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Atom

public Atom(java.lang.Object functor)
Contructs an atom from the specified object.
Parameters:
Object - the functor for this atom
Method Detail

eval

public java.lang.Object eval()
Returns the functor if this structure.
Overrides:
eval in class Structure
Returns:
the functor if this structure

by Steve Metsker