Package jason.asSyntax
Class NumberTermImpl
java.lang.Object
jason.asSyntax.DefaultTerm
jason.asSyntax.NumberTermImpl
- All Implemented Interfaces:
NumberTerm,Term,ToDOM,ToJson,Serializable,Cloneable,Comparable<Term>
Immutable class that implements a term that represents a number
- See Also:
-
Field Summary
Fields inherited from class jason.asSyntax.DefaultTerm
hashCodeCache, srcInfo -
Constructor Summary
ConstructorsConstructorDescriptionNumberTermImpl(double vl) NumberTermImpl(String sn) Deprecated.prefer to use ASSyntax.parseNumber -
Method Summary
Methods inherited from class jason.asSyntax.DefaultTerm
capply, cloneNS, countVars, getCyclicVar, getErrorMsg, getSrcInfo, hashCode, hasVar, isArithExpr, isAtom, isCyclicTerm, isGround, isInternalAction, isList, isLiteral, isMap, isPlanBody, isPred, isRule, isSet, isString, isStructure, isUnnamedVar, isVar, parse, resetHashCodeCache, setSrcInfo, subsumesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jason.asSyntax.Term
capply, cloneNS, countVars, getCyclicVar, getSrcInfo, hasVar, isArithExpr, isAtom, isCyclicTerm, isGround, isInternalAction, isList, isLiteral, isMap, isPlanBody, isPred, isRule, isSet, isString, isStructure, isUnnamedVar, isVar, setSrcInfo, subsumesMethods inherited from interface jason.util.ToJson
getAsJsonStr
-
Constructor Details
-
NumberTermImpl
public NumberTermImpl() -
NumberTermImpl
Deprecated.prefer to use ASSyntax.parseNumber -
NumberTermImpl
public NumberTermImpl(double vl) -
NumberTermImpl
-
-
Method Details
-
solve
public double solve()Description copied from interface:NumberTermreturns the numeric value of the term- Specified by:
solvein interfaceNumberTerm
-
clone
- Specified by:
clonein interfaceTerm- Specified by:
clonein classDefaultTerm
-
isNumeric
public boolean isNumeric()- Specified by:
isNumericin interfaceTerm- Overrides:
isNumericin classDefaultTerm
-
equals
-
calcHashCode
protected int calcHashCode()- Specified by:
calcHashCodein classDefaultTerm
-
compareTo
- Specified by:
compareToin interfaceComparable<Term>- Overrides:
compareToin classDefaultTerm
-
toString
-
getAsDOM
get as XML -
getAsJson
public javax.json.JsonValue getAsJson()
-