Package jason.asSyntax
Class Atom
java.lang.Object
jason.asSyntax.DefaultTerm
jason.asSyntax.Literal
jason.asSyntax.Atom
- All Implemented Interfaces:
LogicalFormula
,Term
,ToDOM
,ToJson
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable<Term>
- Direct Known Subclasses:
Literal.DefaultNameSpace
,Literal.FalseLiteral
,Literal.TrueLiteral
,Structure
public class Atom extends Literal
Represents an atom (a positive literal with no argument and no annotation, e.g. "tell", "a").
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class jason.asSyntax.Literal
Literal.FalseLiteral, Literal.TrueLiteral
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
functor
private static java.util.logging.Logger
logger
private Atom
ns
private static long
serialVersionUID
Fields inherited from class jason.asSyntax.Literal
DefaultNS, LFalse, LNeg, LPos, LTrue, predicateIndicatorCache
Fields inherited from class jason.asSyntax.DefaultTerm
hashCodeCache, srcInfo
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected int
calcHashCode()
Term
capply(Unifier u)
clone and applies together (and faster than clone and then apply)Term
clone()
Literal
cloneNS(Atom newnamespace)
clone in another namespaceint
compareTo(Term t)
boolean
equals(java.lang.Object o)
org.w3c.dom.Element
getAsDOM(org.w3c.dom.Document document)
get as XMLjava.lang.String
getFunctor()
returns the functor of this literalAtom
getNS()
returns the name spaceof this literalboolean
isAtom()
java.lang.String
toString()
Methods inherited from class jason.asSyntax.Literal
addAnnot, addAnnots, addAnnots, addSource, addSourceInfoAsAnnots, addTerm, addTerms, addTerms, canBeAddedInBB, clearAnnots, copy, delAnnot, delAnnots, delAnnots, delSource, delSources, delTerm, equalsAsStructure, forceFullLiteralImpl, getAnnot, getAnnots, getAnnots, getArity, getAsJson, getAsListOfTerms, getPredicateIndicator, getSingletonVars, getSources, getTerm, getTerms, getTermsArray, hasAnnot, hasAnnot, hasSource, hasSource, hasSubsetAnnot, hasSubsetAnnot, hasTerm, importAnnots, isLiteral, logicalConsequence, makeTermsAnnon, makeVarsAnnon, makeVarsAnnon, negated, newFromListOfTerms, newFunctor, noSource, parseLiteral, setAnnots, setNegated, setTerm, setTerms, subjectToBUF
Methods inherited from class jason.asSyntax.DefaultTerm
countVars, getCyclicVar, getErrorMsg, getSrcInfo, hashCode, hasVar, isArithExpr, isCyclicTerm, isGround, isInternalAction, isList, isMap, isNumeric, isPlanBody, isPred, isRule, isSet, isString, isStructure, isUnnamedVar, isVar, parse, resetHashCodeCache, setSrcInfo, subsumes
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface jason.asSyntax.Term
countVars, getCyclicVar, getSrcInfo, hasVar, isArithExpr, isCyclicTerm, isGround, isInternalAction, isList, isMap, isNumeric, isPlanBody, isPred, isRule, isSet, isString, isStructure, isUnnamedVar, isVar, setSrcInfo, subsumes
Methods inherited from interface jason.util.ToJson
getAsJsonStr
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
- Constant Field Values
-
logger
private static java.util.logging.Logger logger -
functor
private final java.lang.String functor -
ns
-
-
Constructor Details
-
Atom
public Atom(java.lang.String functor) -
Atom
-
Atom
-
Atom
-
Atom
-
-
Method Details
-
getFunctor
public java.lang.String getFunctor()Description copied from class:Literal
returns the functor of this literal- Specified by:
getFunctor
in classLiteral
-
getNS
Description copied from class:Literal
returns the name spaceof this literal -
clone
- Specified by:
clone
in interfaceTerm
- Specified by:
clone
in classDefaultTerm
-
capply
Description copied from interface:Term
clone and applies together (and faster than clone and then apply)- Specified by:
capply
in interfaceTerm
- Overrides:
capply
in classDefaultTerm
-
cloneNS
Description copied from interface:Term
clone in another namespace- Specified by:
cloneNS
in interfaceTerm
- Overrides:
cloneNS
in classDefaultTerm
-
isAtom
public boolean isAtom()- Specified by:
isAtom
in interfaceTerm
- Overrides:
isAtom
in classDefaultTerm
-
equals
public boolean equals(java.lang.Object o) -
compareTo
- Specified by:
compareTo
in interfacejava.lang.Comparable<Term>
- Overrides:
compareTo
in classDefaultTerm
-
calcHashCode
protected int calcHashCode()- Specified by:
calcHashCode
in classDefaultTerm
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
getAsDOM
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)get as XML
-