|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.part.Quantity
public final class Quantity
This structured attribute class represents the concept of quantity as
an amount and a QuantityUnit (unit of measure).
Use the newQuantity static factory method(s), not the Quantity
constructor, to construct instances of this class. Instances must be
constructed using the static factory(s), in order to ensure proper initialization
of the instance.
Supported API: true
Extendable: false
| Field Summary | |
|---|---|
static String |
AMOUNT
Label for the attribute; The amount attributes represents the amount portion of the Quantity. |
static String |
UNIT
Label for the attribute. |
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Returns true if the amount and QuantityUnit are equivalent. |
double |
getAmount()
Gets the value of the attribute: AMOUNT. |
QuantityUnit |
getUnit()
Gets the object for the association that plays role: UNIT. |
protected void |
initialize()
Supports initialization, following construction of an instance. |
protected void |
initialize(double an_Amount,
QuantityUnit a_Unit)
Supports initialization, following construction of an instance. |
static Quantity |
newQuantity()
Default factory for Quantity. |
static Quantity |
newQuantity(double an_Amount,
QuantityUnit a_Unit)
Quantity factory, allowing construction with a specified amount and unit. |
void |
setAmount(double a_Amount)
Sets the value of the attribute: AMOUNT. |
void |
setUnit(QuantityUnit a_Unit)
Sets the object for the association that plays role: UNIT. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String AMOUNT
public static final String UNIT
| Method Detail |
|---|
public double getAmount()
public void setAmount(double a_Amount)
a_Amount - public QuantityUnit getUnit()
public void setUnit(QuantityUnit a_Unit)
a_Unit -
public static Quantity newQuantity(double an_Amount,
QuantityUnit a_Unit)
throws WTException
an_Amount - a_Unit -
WTException
protected void initialize(double an_Amount,
QuantityUnit a_Unit)
throws WTException
an_Amount - a_Unit -
WTException
public static Quantity newQuantity()
throws WTException
WTException
protected void initialize()
throws WTException
WTExceptionpublic boolean equals(Object obj)
equals in class Objectobj - The Quantity object to compare against.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||