Prolog Cafe v1.2

jp.ac.kobe_u.cs.prolog.lang
Class NumberTerm

java.lang.Object
  extended by jp.ac.kobe_u.cs.prolog.lang.Term
      extended by jp.ac.kobe_u.cs.prolog.lang.NumberTerm
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Term>
Direct Known Subclasses:
DoubleTerm, IntegerTerm

public abstract class NumberTerm
extends Term

The superclass of classes for integers and floating point numbers.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class jp.ac.kobe_u.cs.prolog.lang.Term
AFTER, BEFORE, EQUAL
 
Constructor Summary
NumberTerm()
           
 
Method Summary
abstract  NumberTerm abs()
          Returns a NumberTerm whose value is abs(this).
abstract  NumberTerm acos()
          Returns a NumberTerm whose value is acos(this).
abstract  NumberTerm add(NumberTerm t)
          Returns a NumberTerm whose value is (this + t).
abstract  NumberTerm and(NumberTerm t)
          Returns a NumberTerm whose value is (this & t).
abstract  int arithCompareTo(NumberTerm t)
          Compares two NumberTerm objects numerically.
abstract  NumberTerm asin()
          Returns a NumberTerm whose value is asin(this).
abstract  NumberTerm atan()
          Returns a NumberTerm whose value is tan(this).
abstract  NumberTerm ceil()
          Returns a NumberTerm whose value is ceil(this).
abstract  NumberTerm cos()
          Returns a NumberTerm whose value is cos(this).
abstract  NumberTerm divide(NumberTerm t)
          Returns a NumberTerm whose value is (this / t).
abstract  double doubleValue()
          Returns the numeric value represented by this object after conversion to type double.
abstract  NumberTerm exp()
          Returns a NumberTerm whose value is exp(this).
abstract  NumberTerm floatFractPart()
          Returns a NumberTerm whose value is the float-fractional-part of this.
abstract  NumberTerm floatIntPart()
          Returns a NumberTerm whose value is the float-integer-part of this.
abstract  NumberTerm floor()
          Returns a NumberTerm whose value is floor(this).
abstract  NumberTerm intDivide(NumberTerm t)
          Returns a NumberTerm whose value is (int)(this / t).
abstract  int intValue()
          Returns the numeric value represented by this object after conversion to type int.
abstract  NumberTerm log()
          Returns a NumberTerm whose value is log(this).
abstract  long longValue()
          Returns the numeric value represented by this object after conversion to type long.
abstract  NumberTerm max(NumberTerm t)
          Returns a NumberTerm whose value is max(this, t).
abstract  NumberTerm min(NumberTerm t)
          Returns a NumberTerm whose value is min(this, t).
abstract  NumberTerm mod(NumberTerm t)
          Returns a NumberTerm whose value is (this mod t).
abstract  NumberTerm multiply(NumberTerm t)
          Returns a NumberTerm whose value is (this * t).
abstract  NumberTerm negate()
          Returns a NumberTerm whose value is (- this).
abstract  NumberTerm not()
          Returns a NumberTerm whose value is (~ this).
abstract  NumberTerm or(NumberTerm t)
          Returns a NumberTerm whose value is (this | t).
abstract  NumberTerm pow(NumberTerm t)
          Returns a NumberTerm whose value is (thist).
abstract  NumberTerm rint()
          Returns a NumberTerm whose value is rint(this).
abstract  NumberTerm round()
          Returns a NumberTerm whose value is round(this).
abstract  NumberTerm shiftLeft(NumberTerm t)
          Returns a NumberTerm whose value is (this << t).
abstract  NumberTerm shiftRight(NumberTerm t)
          Returns a NumberTerm whose value is (this >> t).
abstract  NumberTerm signum()
          Returns a NumberTerm whose value is signum(this).
abstract  NumberTerm sin()
          Returns a NumberTerm whose value is sin(this).
abstract  NumberTerm sqrt()
          Returns a NumberTerm whose value is sqrt(this).
abstract  NumberTerm subtract(NumberTerm t)
          Returns a NumberTerm whose value is (this - t).
abstract  NumberTerm tan()
          Returns a NumberTerm whose value is tan(this).
abstract  NumberTerm toDegrees()
          Returns a NumberTerm whose value is toDegrees(this).
abstract  NumberTerm toFloat()
          Returns a NumberTerm whose value is (double)(this).
abstract  NumberTerm toRadians()
          Returns a NumberTerm whose value is toRadians(this).
abstract  NumberTerm truncate()
          Returns a NumberTerm whose value is the truncate of this.
abstract  NumberTerm xor(NumberTerm t)
          Returns a NumberTerm whose value is (this ^ t).
 
Methods inherited from class jp.ac.kobe_u.cs.prolog.lang.Term
convertible, convertible, copy, dereference, instanceOfTerm, isClosure, isDouble, isGround, isInteger, isJavaObject, isList, isNil, isNumber, isStructure, isSymbol, isVariable, toJava, toQuotedString, unify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

NumberTerm

public NumberTerm()
Method Detail

intValue

public abstract int intValue()
Returns the numeric value represented by this object after conversion to type int.


longValue

public abstract long longValue()
Returns the numeric value represented by this object after conversion to type long.


doubleValue

public abstract double doubleValue()
Returns the numeric value represented by this object after conversion to type double.


arithCompareTo

public abstract int arithCompareTo(NumberTerm t)
Compares two NumberTerm objects numerically.

Parameters:
t - the NumberTerm to compare with.
Returns:
the value 0 if this object is numerically equal to the argument NumberTerm; a value less than 0 if this object is numerically less than the argument NumberTerm; and a value greater than 0 if this object is numerically greater than the argument NumberTerm.

abs

public abstract NumberTerm abs()
Returns a NumberTerm whose value is abs(this).


acos

public abstract NumberTerm acos()
Returns a NumberTerm whose value is acos(this).


add

public abstract NumberTerm add(NumberTerm t)
Returns a NumberTerm whose value is (this + t).


and

public abstract NumberTerm and(NumberTerm t)
Returns a NumberTerm whose value is (this & t).


asin

public abstract NumberTerm asin()
Returns a NumberTerm whose value is asin(this).


atan

public abstract NumberTerm atan()
Returns a NumberTerm whose value is tan(this).


ceil

public abstract NumberTerm ceil()
Returns a NumberTerm whose value is ceil(this).


cos

public abstract NumberTerm cos()
Returns a NumberTerm whose value is cos(this).


divide

public abstract NumberTerm divide(NumberTerm t)
Returns a NumberTerm whose value is (this / t).


exp

public abstract NumberTerm exp()
Returns a NumberTerm whose value is exp(this).


floatIntPart

public abstract NumberTerm floatIntPart()
Returns a NumberTerm whose value is the float-integer-part of this.


floatFractPart

public abstract NumberTerm floatFractPart()
Returns a NumberTerm whose value is the float-fractional-part of this.


floor

public abstract NumberTerm floor()
Returns a NumberTerm whose value is floor(this).


intDivide

public abstract NumberTerm intDivide(NumberTerm t)
Returns a NumberTerm whose value is (int)(this / t).


log

public abstract NumberTerm log()
Returns a NumberTerm whose value is log(this).


max

public abstract NumberTerm max(NumberTerm t)
Returns a NumberTerm whose value is max(this, t).


min

public abstract NumberTerm min(NumberTerm t)
Returns a NumberTerm whose value is min(this, t).


mod

public abstract NumberTerm mod(NumberTerm t)
Returns a NumberTerm whose value is (this mod t).


multiply

public abstract NumberTerm multiply(NumberTerm t)
Returns a NumberTerm whose value is (this * t).


negate

public abstract NumberTerm negate()
Returns a NumberTerm whose value is (- this).


not

public abstract NumberTerm not()
Returns a NumberTerm whose value is (~ this).


or

public abstract NumberTerm or(NumberTerm t)
Returns a NumberTerm whose value is (this | t).


pow

public abstract NumberTerm pow(NumberTerm t)
Returns a NumberTerm whose value is (thist).


rint

public abstract NumberTerm rint()
Returns a NumberTerm whose value is rint(this).


round

public abstract NumberTerm round()
Returns a NumberTerm whose value is round(this).


shiftLeft

public abstract NumberTerm shiftLeft(NumberTerm t)
Returns a NumberTerm whose value is (this << t).


shiftRight

public abstract NumberTerm shiftRight(NumberTerm t)
Returns a NumberTerm whose value is (this >> t).


signum

public abstract NumberTerm signum()
Returns a NumberTerm whose value is signum(this).


sin

public abstract NumberTerm sin()
Returns a NumberTerm whose value is sin(this).


sqrt

public abstract NumberTerm sqrt()
Returns a NumberTerm whose value is sqrt(this).


subtract

public abstract NumberTerm subtract(NumberTerm t)
Returns a NumberTerm whose value is (this - t).


tan

public abstract NumberTerm tan()
Returns a NumberTerm whose value is tan(this).


toDegrees

public abstract NumberTerm toDegrees()
Returns a NumberTerm whose value is toDegrees(this).


toFloat

public abstract NumberTerm toFloat()
Returns a NumberTerm whose value is (double)(this).


toRadians

public abstract NumberTerm toRadians()
Returns a NumberTerm whose value is toRadians(this).


truncate

public abstract NumberTerm truncate()
Returns a NumberTerm whose value is the truncate of this.


xor

public abstract NumberTerm xor(NumberTerm t)
Returns a NumberTerm whose value is (this ^ t).


Prolog Cafe v1.2

Copyright (C) 1997-2008 M.BANBARA and N.TAMURA