com.ifcomputer.minerva
Class MinervaDouble

java.lang.Object
  |
  +--com.ifcomputer.minerva.MinervaTerm
        |
        +--com.ifcomputer.minerva.MinervaNumber
              |
              +--com.ifcomputer.minerva.MinervaDouble
All Implemented Interfaces:
java.io.Serializable

public class MinervaDouble
extends MinervaNumber
implements java.io.Serializable

The class MinervaDouble is used to represent a value of type double.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ifcomputer.minerva.MinervaTerm
ATOM, COMPOUND, DOUBLE, LIST, LONG, OBJECT, VARIABLE
 
Constructor Summary
MinervaDouble(double value)
          Constructs a Minerva double term, representing the value 'value'.
 
Method Summary
 double doubleValue()
          This function returns the value represented by the term.
 boolean equals(java.lang.Object other)
          This function returns true, if 'other' is a MinervaDouble term representing the same value as 'this'.
 int hashCode()
          This function calculates a hashcode for the term.
 long longValue()
          This function returns the value represented by the term as a long value
 java.lang.String toString()
          This function stringifies the term into a format readable by the Minerva read predicates.
 int typeOf()
          This function returns the type (VARIABLE, ATOM, etc.) of this term.
 
Methods inherited from class com.ifcomputer.minerva.MinervaTerm
getEnumeration, getListLength, getStringArray, getTermArray, isList, reset, resolve, setValue
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MinervaDouble

public MinervaDouble(double value)
Constructs a Minerva double term, representing the value 'value'.

Method Detail

longValue

public long longValue()
This function returns the value represented by the term as a long value

Specified by:
longValue in class MinervaNumber

doubleValue

public double doubleValue()
This function returns the value represented by the term.

Specified by:
doubleValue in class MinervaNumber

toString

public java.lang.String toString()
This function stringifies the term into a format readable by the Minerva read predicates.

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
This function returns true, if 'other' is a MinervaDouble term representing the same value as 'this'.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
This function calculates a hashcode for the term.

Overrides:
hashCode in class java.lang.Object

typeOf

public int typeOf()
Description copied from class: MinervaTerm
This function returns the type (VARIABLE, ATOM, etc.) of this term.

Specified by:
typeOf in class MinervaTerm
See Also:
MinervaTerm.VARIABLE, MinervaTerm.ATOM, MinervaTerm.LONG, MinervaTerm.DOUBLE, MinervaTerm.OBJECT, MinervaTerm.COMPOUND, MinervaTerm.LIST