jason.asSyntax
Class NumberTermImpl
java.lang.Object
jason.asSyntax.DefaultTerm
jason.asSyntax.NumberTermImpl
- All Implemented Interfaces:
- NumberTerm, Term, ToDOM, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Term>
public final class NumberTermImpl
- extends DefaultTerm
- implements NumberTerm
Immutable class that implements a term that represents a number
- See Also:
- Serialized Form
Methods inherited from class jason.asSyntax.DefaultTerm |
apply, countVars, getErrorMsg, getSrcInfo, hashCode, hasVar, isArithExpr, isAtom, isGround, isInternalAction, isList, isLiteral, isPlanBody, isPred, isRule, isString, isStructure, isUnnamedVar, isVar, parse, resetHashCodeCache, setSrcInfo |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jason.asSyntax.Term |
apply, countVars, getSrcInfo, hasVar, isArithExpr, isAtom, isGround, isInternalAction, isList, isLiteral, isPlanBody, isPred, isRule, isString, isStructure, isUnnamedVar, isVar, setSrcInfo |
NumberTermImpl
public NumberTermImpl()
NumberTermImpl
public NumberTermImpl(java.lang.String sn)
- Deprecated. prefer to use ASSyntax.parseNumber
NumberTermImpl
public NumberTermImpl(double vl)
NumberTermImpl
public NumberTermImpl(NumberTermImpl t)
solve
public double solve()
- Description copied from interface:
NumberTerm
- returns the numeric value of the term
- Specified by:
solve
in interface NumberTerm
clone
public NumberTerm clone()
- Specified by:
clone
in interface Term
- Specified by:
clone
in class DefaultTerm
isNumeric
public boolean isNumeric()
- Specified by:
isNumeric
in interface Term
- Overrides:
isNumeric
in class DefaultTerm
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interface Term
- Overrides:
equals
in class java.lang.Object
calcHashCode
protected int calcHashCode()
- Specified by:
calcHashCode
in class DefaultTerm
compareTo
public int compareTo(Term o)
- Specified by:
compareTo
in interface java.lang.Comparable<Term>
- Overrides:
compareTo
in class DefaultTerm
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getAsDOM
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
- get as XML
- Specified by:
getAsDOM
in interface ToDOM