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.
-
IntSubtype
- Indicates the current subterm is a 32-bit Integer.
-
NodeSubtype
- Indicates the current subterm is a Node reference.
-
StringIdSubtype
- Indicates the current subterm is a 32-bit StringID.
-
sttError
- An illegal condition has arisen in the enumeration.
-
SubtermEnumeration(int)
- Create an enumeration for a node with the indicated label.
-
SubtermEnumeration(Node)
- Create an enumeration for the Node n.
-
hasMoreElements()
- Indicates if there are more subterms in the node.
-
indexSubtype(int)
- The Type of the subterm with index i.
-
indexSubtype(int, int)
- Given a subtypes value and an index into a Node returns the
subtype of that subterm.
-
nextElement()
- Advances the enumeration and returns the next subterm.
-
nextSubnode()
- Advances the enumeration and returns the next subterm as Node.
-
thisIndex()
- The index of the current element in the enumeration.
-
thisSubtype()
- The subtype of the current subterm.
NodeSubtype
public static final int NodeSubtype
- Indicates the current subterm is a Node reference.
IntSubtype
public static final int IntSubtype
- Indicates the current subterm is a 32-bit Integer.
StringIdSubtype
public static final int StringIdSubtype
- Indicates the current subterm is a 32-bit StringID.
sttError
public static final int sttError
- An illegal condition has arisen in the enumeration.
SubtermEnumeration
public SubtermEnumeration(Node n)
- Create an enumeration for the Node n.
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.
hasMoreElements
public boolean hasMoreElements()
- Indicates if there are more subterms in the node.
nextElement
public Object nextElement()
- Advances the enumeration and returns the next subterm.
nextSubnode
public Node nextSubnode()
- Advances the enumeration and returns the next subterm as Node.
thisIndex
public int thisIndex()
- The index of the current element in the enumeration.
indexSubtype
public int indexSubtype(int i)
- The Type of the subterm with index i. This will be one of
NodeSubtype, IntSubtype or StringIdSubtype.
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.
thisSubtype
public int thisSubtype()
- The subtype of the current subterm.
All Packages Class Hierarchy This Package Previous Next Index