All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class mathbus.SubtermEnumeration

java.lang.Object
   |
   +----mathbus.SubtermEnumeration

public class SubtermEnumeration
extends Object
implements Enumeration
Allows enumeration of the subterms of the node while providing information about the type of subterm.


Variable Index

 o IntSubtype
Indicates the current subterm is a 32-bit Integer.
 o NodeSubtype
Indicates the current subterm is a Node reference.
 o StringIdSubtype
Indicates the current subterm is a 32-bit StringID.
 o sttError
An illegal condition has arisen in the enumeration.

Constructor Index

 o SubtermEnumeration(int)
Create an enumeration for a node with the indicated label.
 o SubtermEnumeration(Node)
Create an enumeration for the Node n.

Method Index

 o hasMoreElements()
Indicates if there are more subterms in the node.
 o indexSubtype(int)
The Type of the subterm with index i.
 o indexSubtype(int, int)
Given a subtypes value and an index into a Node returns the subtype of that subterm.
 o nextElement()
Advances the enumeration and returns the next subterm.
 o nextSubnode()
Advances the enumeration and returns the next subterm as Node.
 o thisIndex()
The index of the current element in the enumeration.
 o thisSubtype()
The subtype of the current subterm.

Variables

 o NodeSubtype
 public static final int NodeSubtype
Indicates the current subterm is a Node reference.

 o IntSubtype
 public static final int IntSubtype
Indicates the current subterm is a 32-bit Integer.

 o StringIdSubtype
 public static final int StringIdSubtype
Indicates the current subterm is a 32-bit StringID.

 o sttError
 public static final int sttError
An illegal condition has arisen in the enumeration.

Constructors

 o SubtermEnumeration
 public SubtermEnumeration(Node n)
Create an enumeration for the Node n.

 o SubtermEnumeration
 public SubtermEnumeration(int label)
Create an enumeration for a node with the indicated label. This enumeration is most often used when creating nodes. Thus, the hasMoreElements will always return true.

Methods

 o hasMoreElements
 public boolean hasMoreElements()
Indicates if there are more subterms in the node.

 o nextElement
 public Object nextElement()
Advances the enumeration and returns the next subterm.

 o nextSubnode
 public Node nextSubnode()
Advances the enumeration and returns the next subterm as Node.

 o thisIndex
 public int thisIndex()
The index of the current element in the enumeration.

 o indexSubtype
 public int indexSubtype(int i)
The Type of the subterm with index i. This will be one of NodeSubtype, IntSubtype or StringIdSubtype.

 o indexSubtype
 public static final int indexSubtype(int Subtypes,
                                      int i)
Given a subtypes value and an index into a Node returns the subtype of that subterm.

 o thisSubtype
 public int thisSubtype()
The subtype of the current subterm.


All Packages  Class Hierarchy  This Package  Previous  Next  Index