se.sics.prologbeans
Class PBAtomic

java.lang.Object
  |
  +--se.sics.prologbeans.Term
        |
        +--se.sics.prologbeans.PBAtomic

public class PBAtomic
extends Term

PBAtomic is the Java representation of Prolog constants and variables.


Fields inherited from class se.sics.prologbeans.Term
name
 
Method Summary
 double doubleValue()
          Returns the floating-point value of this term.
 float floatValue()
          Returns the floating-point value of this term.
 int intValue()
          Returns the integer value of this term.
 boolean isAtom()
          Returns true if this term is an atom and false otherwise.
 boolean isAtomic()
          Returns true if this term is a constant (e.g.
 boolean isFloat()
          Returns true if this term is a floating-point number and false otherwise.
 boolean isInteger()
          Returns true if this term is an integer and false otherwise.
 boolean isVariable()
          Returns true if this term is a variable and false otherwise.
 long longValue()
          Returns the integer value of this term.
 java.lang.String toString()
          Returns a string description of this term.
 
Methods inherited from class se.sics.prologbeans.Term
getArgument, getArity, getName, isCompound, isList, isString, stuffAtom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

isAtom

public boolean isAtom()
Description copied from class: Term
Returns true if this term is an atom and false otherwise.
Overrides:
isAtom in class Term

isInteger

public boolean isInteger()
Description copied from class: Term
Returns true if this term is an integer and false otherwise.
Overrides:
isInteger in class Term

isFloat

public boolean isFloat()
Description copied from class: Term
Returns true if this term is a floating-point number and false otherwise.
Overrides:
isFloat in class Term

isAtomic

public boolean isAtomic()
Description copied from class: Term
Returns true if this term is a constant (e.g. integer, floating-point number, or atom) and false if this term is a compound term or variable.
Overrides:
isAtomic in class Term

isVariable

public boolean isVariable()
Description copied from class: Term
Returns true if this term is a variable and false otherwise.
Overrides:
isVariable in class Term

intValue

public int intValue()
Description copied from class: Term
Returns the integer value of this term.
Overrides:
intValue in class Term
Following copied from class: se.sics.prologbeans.Term
Throws:
java.lang.IllegalStateException - if this term is not an integer

longValue

public long longValue()
Description copied from class: Term
Returns the integer value of this term.
Overrides:
longValue in class Term
Following copied from class: se.sics.prologbeans.Term
Throws:
java.lang.IllegalStateException - if this term is not an integer

floatValue

public float floatValue()
Description copied from class: Term
Returns the floating-point value of this term.
Overrides:
floatValue in class Term
Following copied from class: se.sics.prologbeans.Term
Throws:
java.lang.IllegalStateException - if this term is not a number

doubleValue

public double doubleValue()
Description copied from class: Term
Returns the floating-point value of this term.
Overrides:
doubleValue in class Term
Following copied from class: se.sics.prologbeans.Term
Throws:
java.lang.IllegalStateException - if this term is not a number

toString

public java.lang.String toString()
Description copied from class: Term
Returns a string description of this term.
Overrides:
toString in class Term