public class ArithExpr extends ArithFunctionTerm implements NumberTerm
Modifier and Type | Class and Description |
---|---|
static class |
ArithExpr.ArithmeticOp |
value
emptyTermArray, emptyTermList
LFalse, LNeg, LPos, LTrue, predicateIndicatorCache
hashCodeCache, srcInfo
Constructor and Description |
---|
ArithExpr(ArithExpr.ArithmeticOp oper,
NumberTerm t1) |
ArithExpr(NumberTerm t1,
ArithExpr.ArithmeticOp oper,
NumberTerm t2) |
Modifier and Type | Method and Description |
---|---|
Term |
capply(Unifier u)
computes the value for this arithmetic function (as defined in the NumberTerm interface)
|
boolean |
checkArity(int a) |
NumberTerm |
clone()
make a hard copy of the terms
|
org.w3c.dom.Element |
getAsDOM(org.w3c.dom.Document document)
get as XML
|
NumberTerm |
getLHS()
gets the LHS of this Expression
|
ArithExpr.ArithmeticOp |
getOp()
gets the Operation of this Expression
|
NumberTerm |
getRHS()
gets the RHS of this Expression
|
static NumberTerm |
parseExpr(Agent ag,
java.lang.String sExpr)
returns some Term that can be evaluated as Number
|
static NumberTerm |
parseExpr(java.lang.String sExpr)
returns some Term that can be evaluated as Number
|
java.lang.String |
toString() |
compareTo, equals, getAgent, getErrorMsg, isArithExpr, isAtom, isLiteral, isNumeric, isStructure, logicalConsequence, setAgent, solve
addTerm, addTerms, addTerms, calcHashCode, countVars, delTerm, getArity, getSingletonVars, getTerm, getTerms, getTermsSize, hasTerm, hasVar, isGround, isUnary, makeTermsAnnon, makeVarsAnnon, makeVarsAnnon, parse, setTerm, setTerms, subsumes, varToReplace
getFunctor
addAnnot, addAnnots, addAnnots, addSource, canBeAddedInBB, clearAnnots, copy, delAnnot, delAnnots, delSource, delSources, equalsAsStructure, forceFullLiteralImpl, getAnnot, getAnnots, getAnnots, getAsListOfTerms, getPredicateIndicator, getSources, getTermsArray, hasAnnot, hasAnnot, hasSource, hasSource, hasSubsetAnnot, hasSubsetAnnot, importAnnots, negated, newFromListOfTerms, parseLiteral, setAnnots, setNegated
getCyclicVar, getSrcInfo, hashCode, isCyclicTerm, isInternalAction, isList, isPlanBody, isPred, isRule, isString, isUnnamedVar, isVar, resetHashCodeCache, setSrcInfo
finalize, getClass, notify, notifyAll, wait, wait, wait
solve
countVars, equals, getCyclicVar, getSrcInfo, hasVar, isArithExpr, isAtom, isCyclicTerm, isGround, isInternalAction, isList, isLiteral, isNumeric, isPlanBody, isPred, isRule, isString, isStructure, isUnnamedVar, isVar, setSrcInfo, subsumes
public ArithExpr(NumberTerm t1, ArithExpr.ArithmeticOp oper, NumberTerm t2)
public ArithExpr(ArithExpr.ArithmeticOp oper, NumberTerm t1)
public static NumberTerm parseExpr(java.lang.String sExpr)
public static NumberTerm parseExpr(Agent ag, java.lang.String sExpr)
public Term capply(Unifier u)
ArithFunctionTerm
capply
in interface Term
capply
in class ArithFunctionTerm
public boolean checkArity(int a)
checkArity
in class ArithFunctionTerm
public NumberTerm clone()
clone
in interface Term
clone
in class ArithFunctionTerm
public ArithExpr.ArithmeticOp getOp()
public NumberTerm getLHS()
public NumberTerm getRHS()
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
getAsDOM
in interface ToDOM
getAsDOM
in class ArithFunctionTerm