com.diasparsoftware.java.util
Class Quantity
java.lang.Object
com.diasparsoftware.java.util.Quantity
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- public class Quantity
- extends java.lang.Object
- implements java.io.Serializable, java.lang.Cloneable
- See Also:
- Serialized Form
Constructor Summary |
Quantity(java.math.BigDecimal magnitude,
java.lang.Object unitOfMeasure)
|
Quantity(java.lang.Integer magnitude,
java.lang.Object unitOfMeasure)
|
Method Summary |
Quantity |
add(Quantity that)
|
java.lang.Object |
clone()
If you do not override clone(), then the add() operation
will fail for subclasses of Quantity, returning a Quantity
object rather than one of the specific subclass type. |
boolean |
equals(java.lang.Object other)
|
int |
hashCode()
|
java.lang.String |
toString()
|
static Quantity |
zeroOf(java.lang.Object unitOfMeasure)
|
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
ZERO
public static Quantity ZERO
magnitude
protected java.math.BigDecimal magnitude
unitOfMeasure
protected java.lang.Object unitOfMeasure
Quantity
public Quantity(java.lang.Integer magnitude,
java.lang.Object unitOfMeasure)
Quantity
public Quantity(java.math.BigDecimal magnitude,
java.lang.Object unitOfMeasure)
clone
public java.lang.Object clone()
- If you do not override clone(), then the add() operation
will fail for subclasses of Quantity, returning a Quantity
object rather than one of the specific subclass type.
add
public Quantity add(Quantity that)
equals
public boolean equals(java.lang.Object other)
hashCode
public int hashCode()
toString
public java.lang.String toString()
zeroOf
public static Quantity zeroOf(java.lang.Object unitOfMeasure)
Copyright © 2003-2004 Diaspar Software Services, Inc.. All Rights Reserved.