|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--net.agmodel.physical.AbstractQuantity
|
+--net.agmodel.physical.Composite
This class represents a combination of several quantities.
| Field Summary |
| Fields inherited from class net.agmodel.physical.AbstractQuantity |
AMOUNT_OF_SUBSTANCE, COMPLETE, derivation, DEVOID, DIMENSIONLESS, ELECTRIC_CURRENT, LENGTH, LUMINOUS_INTENSITY, MASS, SPATIALLYINTERPOLATED, TEMPORALLYINTERPOLATED, THERMODYNAMIC_TEMPERATURE, TIME, UNINTERPOLATED |
| Constructor Summary | |
protected |
Composite(double valueSI,
int dimensionSI)
Composite constructor. |
| Method Summary | |
Composite |
add(Composite x)
Returns a Composite whose value is (this + x). |
int |
compareTo(Composite x)
Compares this Composite with the specified Composite. |
int |
compareTo(Object o)
Compares this Composite with the specified Object. |
Composite |
divide(double coefficient)
Returns a Composite whose value is (this / coefficient). |
protected int |
getDimensionSI()
Gets the SI dimension of this Composite. |
double |
getValueSI()
Gets the quantity in SI units. |
Composite |
inverse()
Returns the Composite whose value is (1 / this). |
Composite |
multiply(double coefficient)
Returns a Composite whose value is (this * coefficient). |
Composite |
subtract(Composite x)
Returns a Composite whose value is (this - x). |
| Methods inherited from class net.agmodel.physical.AbstractQuantity |
clone, divide, getSymbolSI, isSpatiallyInterpolated, isTemporallyInterpolated, multiply, toComposite, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected Composite(double valueSI,
int dimensionSI)
valueSI - the value in SI unit.dimensionSI - the SI dimension.| Method Detail |
public Composite add(Composite x)
x - the Composite to be added.
UnitDimensionException - different unit dimensionspublic Composite subtract(Composite x)
x - the Composite to be subtracted.
UnitDimensionException - different unit dimensionspublic Composite multiply(double coefficient)
coefficient - the dimensionless multiplier.
public Composite divide(double coefficient)
coefficient - the dimensionless divisor.
ArithmeticException - coefficient == 0.0public Composite inverse()
ArithmeticException - this.getValueSI() == 0.0public int compareTo(Composite x)
x - Composite to which this Composite is to be compared.
UnitDimensionException - different unit dimensionspublic int compareTo(Object o)
compareTo in interface Comparableo - Object to which this Composite is to be compared.
ClassCastException - o is not a Composite.compareTo(Composite),
Comparablepublic double getValueSI()
getValueSI in class AbstractQuantityprotected int getDimensionSI()
getDimensionSI in class AbstractQuantity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||