Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary

Fields inherited from class jason.asSyntax.DefaultTerm
`hashCodeCache, srcInfo`

Constructor Summary
`NumberTermImpl()`
`NumberTermImpl(double vl)`
`NumberTermImpl(NumberTermImpl t)`
`NumberTermImpl(java.lang.String sn)` Deprecated. prefer to use ASSyntax.parseNumber

Method Summary
`protected int` | `calcHashCode()`
`NumberTerm` | `clone()`
`int` | `compareTo(Term o)`
`boolean` | `equals(java.lang.Object o)`
`org.w3c.dom.Element` | `getAsDOM(org.w3c.dom.Document document)` get as XML
`boolean` | `isNumeric()`
`double` | `solve()` returns the numeric value of the term
`java.lang.String` | `toString()`

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`

Constructor Detail

### 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)

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD