Package jason.asSyntax
Class ArithFunctionTerm
java.lang.Object
jason.asSyntax.DefaultTerm
jason.asSyntax.Literal
jason.asSyntax.Atom
jason.asSyntax.Structure
jason.asSyntax.ArithFunctionTerm
- All Implemented Interfaces:
LogicalFormula,NumberTerm,Term,ToDOM,ToJson,Serializable,Cloneable,Comparable<Term>
- Direct Known Subclasses:
ArithExpr
Represents an arithmetic function, like math.max(arg1,arg2) -- a functor (math.max) and two arguments.
A Structure is thus used to store the data.
- See Also:
-
Field Summary
FieldsFields inherited from class jason.asSyntax.Structure
emptyTermArray, emptyTermListFields inherited from class jason.asSyntax.Literal
DefaultNS, LFalse, LNeg, LPos, LTrue, predicateIndicatorCacheFields inherited from class jason.asSyntax.DefaultTerm
hashCodeCache, srcInfo -
Constructor Summary
ConstructorsConstructorDescriptionArithFunctionTerm(ArithFunction function) ArithFunctionTerm(String functor, int arity) -
Method Summary
Modifier and TypeMethodDescriptioncomputes the value for this arithmetic function (as defined in the NumberTerm interface)booleancheckArity(int a) clone()make a deep copy of the termsclone in another namespaceintbooleangetAgent()get as XMLbooleanbooleanisAtom()booleanbooleanbooleanlogicalConsequence(Agent ag, Unifier un) logicalConsequence checks whether one particular predicate is a logical consequence of the belief base.voiddoublesolve()returns the numeric value of the termMethods inherited from class jason.asSyntax.Structure
addTerm, addTerms, addTerms, calcHashCode, countVars, delTerm, getArity, getSingletonVars, getTerm, getTerms, getTermsSize, hasTerm, hasVar, isGround, isUnary, makeTermsAnnon, makeVarsAnnon, makeVarsAnnon, parse, setTerm, setTerms, subsumes, toString, varToReplaceMethods inherited from class jason.asSyntax.Atom
getFunctor, getNSMethods inherited from class jason.asSyntax.Literal
addAnnot, addAnnots, addAnnots, addSource, addSourceInfoAsAnnots, canBeAddedInBB, clearAnnots, copy, delAnnot, delAnnots, delAnnots, delSource, delSources, equalsAsStructure, forceFullLiteralImpl, getAnnot, getAnnots, getAnnots, getAsJson, getAsListOfTerms, getPredicateIndicator, getSources, getTermsArray, hasAnnot, hasAnnot, hasSource, hasSource, hasSubsetAnnot, hasSubsetAnnot, importAnnots, negated, newFromListOfTerms, newFunctor, noSource, parseLiteral, setAnnots, setNegated, subjectToBUFMethods inherited from class jason.asSyntax.DefaultTerm
getCyclicVar, getSrcInfo, hashCode, isCyclicTerm, isInternalAction, isList, isMap, isPlanBody, isPred, isRule, isSet, isString, isUnnamedVar, isVar, resetHashCodeCache, setSrcInfoMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jason.asSyntax.Term
countVars, getCyclicVar, getSrcInfo, hasVar, isCyclicTerm, isGround, isInternalAction, isList, isMap, isPlanBody, isPred, isRule, isSet, isString, isUnnamedVar, isVar, setSrcInfo, subsumesMethods inherited from interface jason.util.ToJson
getAsJson, getAsJsonStr
-
Field Details
-
value
-
-
Constructor Details
-
ArithFunctionTerm
-
ArithFunctionTerm
-
ArithFunctionTerm
-
-
Method Details
-
isNumeric
public boolean isNumeric()- Specified by:
isNumericin interfaceTerm- Overrides:
isNumericin classDefaultTerm
-
isAtom
public boolean isAtom() -
isStructure
public boolean isStructure()- Specified by:
isStructurein interfaceTerm- Overrides:
isStructurein classStructure
-
isLiteral
public boolean isLiteral() -
isArithExpr
public boolean isArithExpr()- Specified by:
isArithExprin interfaceTerm- Overrides:
isArithExprin classDefaultTerm
-
setAgent
-
getAgent
-
capply
computes the value for this arithmetic function (as defined in the NumberTerm interface) -
solve
Description copied from interface:NumberTermreturns the numeric value of the term- Specified by:
solvein interfaceNumberTerm- Throws:
NoValueException
-
checkArity
public boolean checkArity(int a) -
logicalConsequence
Description copied from class:LiterallogicalConsequence checks whether one particular predicate is a logical consequence of the belief base. Returns an iterator for all unifiers that are logCons.- Specified by:
logicalConsequencein interfaceLogicalFormula- Overrides:
logicalConsequencein classLiteral
-
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<Term>- Overrides:
compareToin classAtom
-
getErrorMsg
- Overrides:
getErrorMsgin classDefaultTerm
-
clone
Description copied from class:Structuremake a deep copy of the terms -
cloneNS
Description copied from interface:Termclone in another namespace -
getAsDOM
Description copied from class:Structureget as XML
-