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
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
ConstructorDescriptionArithFunctionTerm
(ArithFunction function) ArithFunctionTerm
(String functor, int arity) -
Method Summary
Modifier and TypeMethodDescriptioncomputes the value for this arithmetic function (as defined in the NumberTerm interface)boolean
checkArity
(int a) clone()
make a deep copy of the termsclone in another namespaceint
boolean
getAgent()
get as XMLboolean
boolean
isAtom()
boolean
boolean
boolean
logicalConsequence
(Agent ag, Unifier un) logicalConsequence checks whether one particular predicate is a logical consequence of the belief base.void
double
solve()
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, varToReplace
Methods inherited from class jason.asSyntax.Atom
getFunctor, getNS
Methods 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, subjectToBUF
Methods inherited from class jason.asSyntax.DefaultTerm
getCyclicVar, getSrcInfo, hashCode, isCyclicTerm, isInternalAction, isList, isMap, isPlanBody, isPred, 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
countVars, getCyclicVar, getSrcInfo, hasVar, isCyclicTerm, isGround, isInternalAction, isList, isMap, isPlanBody, isPred, isRule, isSet, isString, isUnnamedVar, isVar, setSrcInfo, subsumes
Methods inherited from interface jason.util.ToJson
getAsJson, getAsJsonStr
-
Field Details
-
value
-
-
Constructor Details
-
ArithFunctionTerm
-
ArithFunctionTerm
-
ArithFunctionTerm
-
-
Method Details
-
isNumeric
public boolean isNumeric()- Specified by:
isNumeric
in interfaceTerm
- Overrides:
isNumeric
in classDefaultTerm
-
isAtom
public boolean isAtom() -
isStructure
public boolean isStructure()- Specified by:
isStructure
in interfaceTerm
- Overrides:
isStructure
in classStructure
-
isLiteral
public boolean isLiteral() -
isArithExpr
public boolean isArithExpr()- Specified by:
isArithExpr
in interfaceTerm
- Overrides:
isArithExpr
in classDefaultTerm
-
setAgent
-
getAgent
-
capply
computes the value for this arithmetic function (as defined in the NumberTerm interface) -
solve
Description copied from interface:NumberTerm
returns the numeric value of the term- Specified by:
solve
in interfaceNumberTerm
- Throws:
NoValueException
-
checkArity
public boolean checkArity(int a) -
logicalConsequence
Description copied from class:Literal
logicalConsequence checks whether one particular predicate is a logical consequence of the belief base. Returns an iterator for all unifiers that are logCons.- Specified by:
logicalConsequence
in interfaceLogicalFormula
- Overrides:
logicalConsequence
in classLiteral
-
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Term>
- Overrides:
compareTo
in classAtom
-
getErrorMsg
- Overrides:
getErrorMsg
in classDefaultTerm
-
clone
Description copied from class:Structure
make a deep copy of the terms -
cloneNS
Description copied from interface:Term
clone in another namespace -
getAsDOM
Description copied from class:Structure
get as XML
-