Class PrologAtom
- java.lang.Object
-
- com.igormaznitsa.prologparser.terms.PrologTerm
-
- com.igormaznitsa.prologparser.terms.PrologAtom
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<PrologTerm>
public final class PrologAtom extends PrologTerm
Prolog atom.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUID-
Fields inherited from class com.igormaznitsa.prologparser.terms.PrologTerm
quotation, text
-
-
Constructor Summary
Constructors Constructor Description PrologAtom(PrologTerm term)PrologAtom(java.lang.String text)PrologAtom(java.lang.String text, int line, int pos)PrologAtom(java.lang.String text, Quotation quotingType)PrologAtom(java.lang.String text, Quotation quotingType, int line, int pos)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPrecedence()Get precedence of the term.QuotationgetQuotation()Get quotation for the term.TermTypegetType()Get term type.-
Methods inherited from class com.igormaznitsa.prologparser.terms.PrologTerm
assertNonEmptyString, compareTo, findQuotation, flatComma, getArity, getFunctor, getLine, getPos, getText, isAnyBlock, isBlock, isCurlyBlock, setLine, setPos, stream, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PrologAtom
public PrologAtom(java.lang.String text, Quotation quotingType)
-
PrologAtom
public PrologAtom(java.lang.String text)
-
PrologAtom
public PrologAtom(PrologTerm term)
-
PrologAtom
public PrologAtom(java.lang.String text, int line, int pos)
-
PrologAtom
public PrologAtom(java.lang.String text, Quotation quotingType, int line, int pos)
-
-
Method Detail
-
getQuotation
public Quotation getQuotation()
Description copied from class:PrologTermGet quotation for the term.- Overrides:
getQuotationin classPrologTerm- Returns:
- the quotation for the term, must not be null
-
getType
public TermType getType()
Description copied from class:PrologTermGet term type.- Specified by:
getTypein classPrologTerm- Returns:
- term type, 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
-
-