shared
Class DoubleRef
java.lang.Object
|
+--shared.DoubleRef
- public class DoubleRef
- extends java.lang.Object
This is an double wrapper, made because the JDK1.2.2 Double wrapper
doesn't allow changes to be made to the integer value.
|
Field Summary |
double |
value
The value of this wrapper. |
|
Method Summary |
boolean |
equals(java.lang.Object rhs)
Compares this DoubleRef object to the specified DoubleRef object. |
java.lang.String |
toString()
Converts this wrapper to a String. |
| Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
value
public double value
- The value of this wrapper.
DoubleRef
public DoubleRef()
- Constructor. Sets value to 0 by default.
DoubleRef
public DoubleRef(double v)
- Constructor.
- Parameters:
v - The value to be stored in this wrapper.
toString
public java.lang.String toString()
- Converts this wrapper to a String.
- Overrides:
- toString in class java.lang.Object
- Returns:
- A String representation of the value stored in this wrapper.
equals
public boolean equals(java.lang.Object rhs)
- Compares this DoubleRef object to the specified DoubleRef object.
- Overrides:
- equals in class java.lang.Object
- Parameters:
rhs - The DoubleRef object this object is being compared to.- Returns:
- True if the values are equal, false otherwise.