|
||||||||||
| 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.Proportion
This class represents the figure formed by two lines diverging from a common point.
| 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 | |
Proportion(double value,
ProportionUnit unit)
Proportion constructor. |
|
Proportion(Duration numerator,
Duration denominator)
|
|
| Method Summary | |
Proportion |
add(Proportion x)
Returns a Proportion whose value is (this + x). |
int |
compareTo(Object o)
Compares this Proportion with the specified Object. |
int |
compareTo(Proportion x)
Compares this Proportion with the specified Proportion. |
Proportion |
divide(double coefficient)
Returns an Proportion whose value is (this / coefficient). |
protected int |
getDimensionSI()
Gets the SI dimension of this Proportion. |
double |
getValue(ProportionUnit unit)
Gets the proportion in the specified unit. |
protected double |
getValueSI()
Gets the Proportion in radians. |
Proportion |
multiply(double coefficient)
Returns an Proportion whose value is (this * coefficient). |
void |
setValue(double value,
ProportionUnit unit)
Sets this Proportion using the specified unit. |
Proportion |
substract(Proportion x)
Returns an Proportion 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 |
public Proportion(double value,
ProportionUnit unit)
value - the proportion in the specified unit.unit - the measurement unit being used.
ArrayArrayIndexOutOfBoundsException - unknown measurement unit
public Proportion(Duration numerator,
Duration denominator)
| Method Detail |
public double getValue(ProportionUnit unit)
unit - the measurement unit being used.
ArrayIndexOutOfBoundsException - unknown measurement unit
public void setValue(double value,
ProportionUnit unit)
value - the new proportion in the specified unit.unit - the measurement unit being used.
ArrayIndexOutOfBoundsException - unknown measurement unitpublic Proportion add(Proportion x)
x - the Proportion to be added.
public Proportion substract(Proportion x)
x - the Proportion to be substracted.
public Proportion multiply(double coefficient)
coefficient - the dimensionless multiplier.
public Proportion divide(double coefficient)
coefficient - the dimensionless divisor.
ArithmeticException - coefficient == 0.0public int compareTo(Proportion x)
x - Proportion to which this Proportion is to be compared.
public int compareTo(Object o)
compareTo in interface Comparableo - Object to which this Proportion is to be compared.
ClassCastException - o is not a Proportion.compareTo(Proportion),
Comparableprotected 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 | |||||||||