Opus5
Class Dbl

java.lang.Object
  |
  +--Opus5.AbstractObject
        |
        +--Opus5.Dbl
All Implemented Interfaces:
Comparable

public class Dbl
extends AbstractObject

Wrapper class that wraps a double and implements the Comparable interface.

Version:
$Id: Dbl.java,v 3.3 1998/07/28 13:27:22 brpreiss Exp $
Author:
Bruno R. Preiss, P.Eng.
See Also:
Comparable

Field Summary
protected  double value
          The wrapped double.
 
Fields inherited from interface Opus5.Comparable
copyright
 
Constructor Summary
Dbl(double value)
          Constructs a Dbl with the specified value.
 
Method Summary
protected  int compareTo(Comparable object)
          Compares this Dbl with the specified comparable object.
 double doubleValue()
          Returns the value of this Dbl.
 int hashCode()
          Returns a hashcode for this Dbl.
 java.lang.String toString()
          Returns a string representation of this Dbl.
 
Methods inherited from class Opus5.AbstractObject
compare, equals, isEQ, isGE, isGT, isLE, isLT, isNE
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected double value
The wrapped double.
Constructor Detail

Dbl

public Dbl(double value)
Constructs a Dbl with the specified value.
Parameters:
value - The specified value.
Method Detail

doubleValue

public double doubleValue()
Returns the value of this Dbl.
Returns:
The value of this Dbl.

compareTo

protected int compareTo(Comparable object)
Compares this Dbl with the specified comparable object. The specified comparable object is assumed to be a Dbl instance.
Overrides:
compareTo in class AbstractObject
Parameters:
object - The object with which this object is compared.
Returns:
-1 if this object is less than the specified object; +1 if this object is greater than the specfied object; zero if the two objects are equal.

hashCode

public int hashCode()
Returns a hashcode for this Dbl.
Overrides:
hashCode in class java.lang.Object
Returns:
A hashcode for this Dbl.

toString

public java.lang.String toString()
Returns a string representation of this Dbl.
Overrides:
toString in class java.lang.Object
Returns:
A string representation of this Dbl.