alice.tuprolog
Class Int

java.lang.Object
  extended byalice.tuprolog.Term
      extended byalice.tuprolog.Number
          extended byalice.tuprolog.Int
All Implemented Interfaces:
java.io.Serializable

public class Int
extends Number

Int class represents the integer prolog data type

See Also:
Serialized Form

Field Summary
 
Fields inherited from class alice.tuprolog.Term
FALSE, TRUE
 
Constructor Summary
Int(int v)
           
 
Method Summary
 double doubleValue()
          Returns the value of the Integer as double
 float floatValue()
          Returns the value of the Integer as float
 int intValue()
          Returns the value of the Integer as int
 boolean isEqual(Term t)
          Returns true if this integer term is equal that the term provided.
 boolean isGreater(Term t)
          Returns true if this integer term is grater that the term provided.
 boolean isInteger()
          is this term a prolog integer term?
 boolean isReal()
          is this term a prolog real term?
 boolean isTypeDouble()
          is a double Real number?
 boolean isTypeFloat()
          is a float Real number?
 boolean isTypeInt()
          is an int Integer number?
 boolean isTypeLong()
          is a long Integer number?
 long longValue()
          Returns the value of the Integer as long
 java.lang.String toString()
           
 
Methods inherited from class alice.tuprolog.Number
copy, getTerm, isAtom, isAtomic, isCompound, isGround, isList, isNull, isNumber, isStruct, isVar
 
Methods inherited from class alice.tuprolog.Term
equals, getIterator, getRenamedCopy, match, parse, parse, resolveVariables, unify
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Int

public Int(int v)
Method Detail

intValue

public final int intValue()
Returns the value of the Integer as int

Specified by:
intValue in class Number

floatValue

public final float floatValue()
Returns the value of the Integer as float

Specified by:
floatValue in class Number

doubleValue

public final double doubleValue()
Returns the value of the Integer as double

Specified by:
doubleValue in class Number

longValue

public final long longValue()
Returns the value of the Integer as long

Specified by:
longValue in class Number

isInteger

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

Specified by:
isInteger in class Number

isReal

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

Specified by:
isReal in class Number

isTypeInt

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

Specified by:
isTypeInt in class Number

isTypeFloat

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

Specified by:
isTypeFloat in class Number

isTypeDouble

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

Specified by:
isTypeDouble in class Number

isTypeLong

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

Specified by:
isTypeLong in class Number

isGreater

public boolean isGreater(Term t)
Returns true if this integer term is grater that the term provided. For number term argument, the int value is considered.

Specified by:
isGreater in class Term

isEqual

public boolean isEqual(Term t)
Returns true if this integer term is equal that the term provided. For number term argument, the int value is considered.

Specified by:
isEqual in class Term

toString

public java.lang.String toString()


DEIS, Universita' di Bologna, Sede di Cesena