Building Parsers with Java

sjm.engine
Class ProgramEnumerator

java.lang.Object
  |
  +--sjm.engine.ProgramEnumerator

public class ProgramEnumerator
extends java.lang.Object
implements AxiomEnumeration

A ProgramEnumerator returns the axioms of a program, one at a time.


Field Summary
protected  java.util.Enumeration e
           
 
Constructor Summary
ProgramEnumerator(Program p)
          Construct an enumeration of the given program.
 
Method Summary
 boolean hasMoreAxioms()
          Tests if this enumeration contains more axioms.
 Axiom nextAxiom()
          Returns the next axiom of this enumeration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

e

protected java.util.Enumeration e
Constructor Detail

ProgramEnumerator

public ProgramEnumerator(Program p)
Construct an enumeration of the given program.
Parameters:
Program - the program to enumerate over
Method Detail

hasMoreAxioms

public boolean hasMoreAxioms()
Tests if this enumeration contains more axioms.
Specified by:
hasMoreAxioms in interface AxiomEnumeration
Returns:
true if the program this enumeration is constructed for contains more axioms, and false otherwise.

nextAxiom

public Axiom nextAxiom()
Returns the next axiom of this enumeration.
Specified by:
nextAxiom in interface AxiomEnumeration
Returns:
the next axiom of this enumeration.

by Steve Metsker