Class TermWrapper
java.lang.Object
com.igormaznitsa.prologparser.terms.PrologTerm
com.igormaznitsa.prologparser.terms.PrologCompound
com.igormaznitsa.prologparser.terms.InternalSpecialCompoundTerm
com.igormaznitsa.prologparser.tokenizer.TermWrapper
- All Implemented Interfaces:
Serializable,Comparable<PrologTerm>
Internal term wrapper to build AST.
- See Also:
-
Field Summary
FieldsFields inherited from class com.igormaznitsa.prologparser.terms.PrologTerm
quotation, text -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.igormaznitsa.prologparser.terms.InternalSpecialCompoundTerm
compareTo, getTermAt, streamMethods inherited from class com.igormaznitsa.prologparser.terms.PrologTerm
assertNonEmptyString, findQuotation, flatComma, getFunctor, getLine, getPos, isAnyBlock, isBlock, isCurlyBlock, setLine, setPos
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
wrappedTerm
-
-
Constructor Details
-
TermWrapper
-
-
Method Details
-
getArity
public int getArity()Description copied from class:PrologTermArity of element.- Overrides:
getArityin classPrologTerm- Returns:
- arity of element, make sense for compound terms, for primitive terms is 1
-
getWrappedTerm
-
getQuotation
Description copied from class:PrologTermGet quotation for the term.- Overrides:
getQuotationin classPrologTerm- Returns:
- the quotation for the term, must not be null
-
getType
Description copied from class:PrologTermGet term type.- Specified by:
getTypein classPrologTerm- Returns:
- term type, must not be null
-
getText
Description copied from class:PrologTermGet the term text.- Overrides:
getTextin classPrologTerm- Returns:
- the term text, must not be null
-
getPrecedence
public int getPrecedence()Description copied from class:PrologTermGet precedence of the term.- Overrides:
getPrecedencein classPrologTerm- Returns:
- precedence, must not be negative
-
toString
- Overrides:
toStringin classPrologTerm
-