public class TermNavigator extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
TermNavigator.MutablePair<Fst,Snd>
A mutable tuple of two types
|
Modifier and Type | Field and Description |
---|---|
private LinkedList<TermNavigator.MutablePair<Term,Integer>> |
stack
top element on stack contains always the pair whose
first component is the element to be returned by
#next() while the second points to the child to
be visited next (or equals the arity of the first component
if no such child exists)
For all elements on the stack that are not the top element
the second component is less than the arity of the term in the
first component |
Constructor and Description |
---|
TermNavigator(Term term) |
Modifier and Type | Method and Description |
---|---|
Term |
getCurrentSubterm() |
void |
gotoNext() |
private void |
gotoNextHelper() |
void |
gotoNextSibling() |
boolean |
hasNext() |
boolean |
hasNextSibling() |
private final LinkedList<TermNavigator.MutablePair<Term,Integer>> stack
#next()
while the second points to the child to
be visited next (or equals the arity of the first component
if no such child exists)
For all elements on the stack that are not the top element
the second component is less than the arity of the term in the
first componentpublic TermNavigator(Term term)
public boolean hasNext()
public boolean hasNextSibling()
public Term getCurrentSubterm()
private void gotoNextHelper()
public void gotoNext()
public void gotoNextSibling()