alice.tuprolog
Class Number

java.lang.Object
  extended byalice.tuprolog.Term
      extended byalice.tuprolog.Number
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Double, Float, Int, Long

public abstract class Number
extends Term

Number abstract class represents numbers prolog data type

See Also:
Int, Long, Float, Double, Serialized Form

Field Summary
 
Fields inherited from class alice.tuprolog.Term
FALSE, TRUE
 
Constructor Summary
Number()
           
 
Method Summary
 Term copy()
          gets a copy of this term.
abstract  double doubleValue()
          Returns the value of the number as double
abstract  float floatValue()
          Returns the value of the number as float
 Term getTerm()
          Gets the actual term referred by this Term.
abstract  int intValue()
          Returns the value of the number as int
 boolean isAtom()
          is this term a prolog (alphanumeric) atom?
 boolean isAtomic()
          is this term a constant prolog term?
 boolean isCompound()
          is this term a prolog compound term?
 boolean isGround()
          is this term a ground term?
abstract  boolean isInteger()
          is this term a prolog integer term?
 boolean isList()
          is this term a prolog list?
 boolean isNull()
          is this term a null term?
 boolean isNumber()
          is this term a prolog numeric term?
abstract  boolean isReal()
          is this term a prolog real term?
 boolean isStruct()
          is this term a struct
abstract  boolean isTypeDouble()
          is a double Real number?
abstract  boolean isTypeFloat()
          is a float Real number?
abstract  boolean isTypeInt()
          is an int Integer number?
abstract  boolean isTypeLong()
          is a long Integer number?
 boolean isVar()
          is this term a variable
abstract  long longValue()
          Returns the value of the number as long
 
Methods inherited from class alice.tuprolog.Term
equals, getIterator, getRenamedCopy, isEqual, isGreater, match, parse, parse, resolveVariables, unify
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Number

public Number()
Method Detail

intValue

public abstract int intValue()
Returns the value of the number as int


floatValue

public abstract float floatValue()
Returns the value of the number as float


longValue

public abstract long longValue()
Returns the value of the number as long


doubleValue

public abstract double doubleValue()
Returns the value of the number as double


isInteger

public abstract boolean isInteger()
is this term a prolog integer term?


isReal

public abstract boolean isReal()
is this term a prolog real term?


isTypeInt

public abstract boolean isTypeInt()
is an int Integer number?


isTypeFloat

public abstract boolean isTypeFloat()
is a float Real number?


isTypeDouble

public abstract boolean isTypeDouble()
is a double Real number?


isTypeLong

public abstract boolean isTypeLong()
is a long Integer number?


getTerm

public Term getTerm()
Gets the actual term referred by this Term.

Specified by:
getTerm in class Term

isNumber

public final boolean isNumber()
is this term a prolog numeric term?

Specified by:
isNumber in class Term

isStruct

public final boolean isStruct()
is this term a struct

Specified by:
isStruct in class Term

isVar

public final boolean isVar()
is this term a variable

Specified by:
isVar in class Term

isNull

public final boolean isNull()
Description copied from class: Term
is this term a null term?

Specified by:
isNull in class Term

isAtomic

public final boolean isAtomic()
is this term a constant prolog term?

Specified by:
isAtomic in class Term

isCompound

public final boolean isCompound()
is this term a prolog compound term?

Specified by:
isCompound in class Term

isAtom

public final boolean isAtom()
is this term a prolog (alphanumeric) atom?

Specified by:
isAtom in class Term

isList

public final boolean isList()
is this term a prolog list?

Specified by:
isList in class Term

isGround

public final boolean isGround()
is this term a ground term?

Specified by:
isGround in class Term

copy

public Term copy()
gets a copy of this term.

Specified by:
copy in class Term


DEIS, Universita' di Bologna, Sede di Cesena