Package jason.asSyntax
Class CyclicTerm
- All Implemented Interfaces:
LogicalFormula
,Term
,ToDOM
,ToJson
,Serializable
,Cloneable
,Comparable<Term>
A term with recursion (cyclic), created by code like X = f(X).
- See Also:
-
Field Summary
Fields inherited from class jason.asSyntax.Structure
emptyTermArray, emptyTermList
Fields inherited from class jason.asSyntax.Literal
DefaultNS, LFalse, LNeg, LPos, LTrue, predicateIndicatorCache
Fields inherited from class jason.asSyntax.DefaultTerm
hashCodeCache, srcInfo
-
Constructor Summary
ConstructorDescriptionCyclicTerm
(Literal t, VarTerm v) creates a positive literalCyclicTerm
(Literal t, VarTerm v, Unifier u) -
Method Summary
Methods inherited from class jason.asSyntax.LiteralImpl
canBeAddedInBB, cloneNS, getErrorMsg, getPredicateIndicator, isAtom, negated, setNegated
Methods inherited from class jason.asSyntax.Pred
addAnnot, addAnnots, addAnnots, addSource, capplyAnnots, clearAnnots, countVars, createSource, delAnnot, delAnnots, delSource, delSources, equalsAsStructure, getAnnot, getAnnots, getAnnots, getSources, hasAnnot, hasAnnot, hasSource, hasSource, hasSubsetAnnot, hasSubsetAnnot, hasVar, importAnnots, isGround, isPred, parsePred, setAnnots, toStringAsTerm
Methods inherited from class jason.asSyntax.Structure
addTerm, addTerms, addTerms, delTerm, getArity, getSingletonVars, getTerm, getTerms, getTermsSize, hasTerm, isStructure, isUnary, makeTermsAnnon, makeVarsAnnon, parse, setTerm, setTerms, subsumes, varToReplace
Methods inherited from class jason.asSyntax.Atom
compareTo, getFunctor, getNS
Methods inherited from class jason.asSyntax.Literal
addSourceInfoAsAnnots, copy, delAnnots, forceFullLiteralImpl, getAsJson, getAsListOfTerms, getTermsArray, isLiteral, logicalConsequence, newFromListOfTerms, newFunctor, noSource, parseLiteral, subjectToBUF
Methods inherited from class jason.asSyntax.DefaultTerm
getSrcInfo, hashCode, isArithExpr, isInternalAction, isList, isMap, isNumeric, isPlanBody, isRule, isSet, isString, isUnnamedVar, isVar, resetHashCodeCache, setSrcInfo
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface jason.asSyntax.Term
getSrcInfo, isArithExpr, isInternalAction, isList, isMap, isNumeric, isPlanBody, isRule, isSet, isString, isUnnamedVar, isVar, setSrcInfo
Methods inherited from interface jason.util.ToJson
getAsJsonStr
-
Constructor Details
-
CyclicTerm
creates a positive literal -
CyclicTerm
-
-
Method Details
-
getCyclicVar
- Specified by:
getCyclicVar
in interfaceTerm
- Overrides:
getCyclicVar
in classDefaultTerm
-
isCyclicTerm
public boolean isCyclicTerm()- Specified by:
isCyclicTerm
in interfaceTerm
- Overrides:
isCyclicTerm
in classDefaultTerm
-
equals
- Specified by:
equals
in interfaceTerm
- Overrides:
equals
in classLiteralImpl
-
makeVarsAnnon
Description copied from class:Literal
replaces all variables of the term for unnamed variables (_).- Overrides:
makeVarsAnnon
in classPred
- Parameters:
u
- is the unifier that contains the map of replacements
-
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 classLiteralImpl
-
clone
Description copied from class:Structure
make a deep copy of the terms- Specified by:
clone
in interfaceTerm
- Overrides:
clone
in classLiteralImpl
-
calcHashCode
protected int calcHashCode()- Overrides:
calcHashCode
in classLiteralImpl
-
toString
-
getAsDOM
Description copied from class:LiteralImpl
get as XML- Specified by:
getAsDOM
in interfaceToDOM
- Overrides:
getAsDOM
in classLiteralImpl
-