Term.TermIterator
Constructor and Description |
---|
NodeTerm(String sFunctor)
Construct a new TermNode with the given functor.
|
NodeTerm(String sFunctor,
Term t1)
Construct a new TermNode with the given functor and given Terms.
|
NodeTerm(String sFunctor,
Term[] aTerms)
Construct a new TermNode with the given functor and given Terms.
|
NodeTerm(String sFunctor,
Term[] aTerms,
Term term)
Construct a new TermNode with the given functor and given Terms.
|
NodeTerm(String sFunctor,
Term t1,
Term t2)
Construct a new TermNode with the given functor and given Terms.
|
NodeTerm(String sFunctor,
Term term,
Term[] aTerms)
Construct a new TermNode with the given functor and given Terms.
|
NodeTerm(String sFunctor,
Term t1,
Term t2,
Term t3)
Construct a new TermNode with the given functor and given Terms.
|
NodeTerm(String sFunctor,
Term t1,
Term t2,
Term t3,
Term t4)
Construct a new TermNode with the given functor and given Terms.
|
NodeTerm(String sFunctor,
Term t1,
Term t2,
Term t3,
Term t4,
Term t5)
Construct a new TermNode with the given functor and given Terms.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(TermWalker walker)
Do a dispatch back to the given walker.
|
Term[] |
children()
Obtain the childern Terms
|
String |
fullFormString()
Answer a String representation of the Term that is allowed to
show more internal details than toString()
which does not compress information.
|
String |
getFunctor()
Obtain the functor representation of the Term.
|
boolean |
isAtom()
Answer whether the receiver is an Atomic Term.
|
boolean |
isLeaf()
Answer whether the receiver has children.
|
int |
length()
Answer whether the length of the receivers children
|
void |
setFunctor(String sFunctor)
Set the receiver's functor to be the given String
|
Term |
termAt(int index)
Obtain the child term at the given index.
|
boolean |
termEqual(Term t)
Answer whether the receiver is equal to the given Term.
|
String |
toString()
Return a human-readable description for this Node.
|
Term |
withChild(Term t)
Join the receiver with the given child Term.
|
childrenTermEqual, findAttribute, findChild, headChildrenTermEqual, isNumber, iterator
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public NodeTerm(String sFunctor)
sFunctor
- the functor for the Termpublic NodeTerm(String sFunctor, Term t1)
sFunctor
- the functor for the Termt1
- a child termpublic NodeTerm(String sFunctor, Term t1, Term t2)
sFunctor
- the functor for the Termt1
- a child termt2
- a child termpublic NodeTerm(String sFunctor, Term t1, Term t2, Term t3)
sFunctor
- the functor for the Termt1
- a child termt2
- a child termt3
- a child termpublic NodeTerm(String sFunctor, Term t1, Term t2, Term t3, Term t4)
sFunctor
- the functor for the Termt1
- a child termt2
- a child termt3
- a child termt4
- a child termpublic NodeTerm(String sFunctor, Term t1, Term t2, Term t3, Term t4, Term t5)
sFunctor
- the functor for the Termt1
- a child termt2
- a child termt3
- a child termt4
- a child termt5
- a child termpublic NodeTerm(String sFunctor, Term[] aTerms)
sFunctor
- the functor for the TermaTerms
- children of the nodepublic NodeTerm(String sFunctor, Term term, Term[] aTerms)
sFunctor
- the functor for the Termterm
- a termaTerms
- children of the nodepublic String getFunctor()
getFunctor
in class Term
public boolean isLeaf()
public boolean isAtom()
public Term[] children()
public int length()
public Term termAt(int index)
public Term withChild(Term t)
public boolean termEqual(Term t)
public String fullFormString()
fullFormString
in class Term
public void accept(TermWalker walker)
Term
public String toString()
public void setFunctor(String sFunctor)
sFunctor
- the new functor for this Term