Package jason.asSyntax
Class ArithExpr
- All Implemented Interfaces:
LogicalFormula,NumberTerm,Term,ToDOM,ToJson,Serializable,Cloneable,Comparable<Term>
Represents and solve arithmetic expressions like "10 + 30".
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class jason.asSyntax.ArithFunctionTerm
valueFields 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
ConstructorsConstructorDescriptionArithExpr(ArithExpr.ArithmeticOp oper, NumberTerm t1) ArithExpr(NumberTerm t1, ArithExpr.ArithmeticOp oper, NumberTerm t2) -
Method Summary
Modifier and TypeMethodDescriptioncomputes the value for this arithmetic function (as defined in the NumberTerm interface)booleancheckArity(int a) clone()make a hard copy of the termsclone in another namespaceget as XMLgetLHS()gets the LHS of this ExpressiongetOp()gets the Operation of this ExpressiongetRHS()gets the RHS of this Expressionstatic NumberTermreturns some Term that can be evaluated as Numberstatic NumberTermreturns some Term that can be evaluated as NumbertoString()Methods inherited from class jason.asSyntax.ArithFunctionTerm
compareTo, equals, getAgent, getErrorMsg, isArithExpr, isAtom, isLiteral, isNumeric, isStructure, logicalConsequence, setAgent, solveMethods 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, 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 java.lang.Comparable
compareToMethods inherited from interface jason.asSyntax.NumberTerm
solveMethods inherited from interface jason.asSyntax.Term
countVars, equals, getCyclicVar, getSrcInfo, hasVar, isArithExpr, isAtom, isCyclicTerm, isGround, isInternalAction, isList, isLiteral, isMap, isNumeric, isPlanBody, isPred, isRule, isSet, isString, isStructure, isUnnamedVar, isVar, setSrcInfo, subsumesMethods inherited from interface jason.util.ToJson
getAsJson, getAsJsonStr
-
Constructor Details
-
ArithExpr
-
ArithExpr
-
-
Method Details
-
parseExpr
returns some Term that can be evaluated as Number -
parseExpr
returns some Term that can be evaluated as Number -
capply
Description copied from class:ArithFunctionTermcomputes the value for this arithmetic function (as defined in the NumberTerm interface)- Specified by:
capplyin interfaceTerm- Overrides:
capplyin classArithFunctionTerm
-
checkArity
public boolean checkArity(int a) - Overrides:
checkArityin classArithFunctionTerm
-
clone
make a hard copy of the terms- Specified by:
clonein interfaceTerm- Overrides:
clonein classArithFunctionTerm
-
cloneNS
Description copied from interface:Termclone in another namespace- Specified by:
cloneNSin interfaceTerm- Overrides:
cloneNSin classArithFunctionTerm
-
getOp
gets the Operation of this Expression -
getLHS
gets the LHS of this Expression -
getRHS
gets the RHS of this Expression -
toString
-
getAsDOM
get as XML- Specified by:
getAsDOMin interfaceToDOM- Overrides:
getAsDOMin classArithFunctionTerm
-