|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.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 |
COMPLETE, DEVOID, SPATIALLYINTERPOLATED, TEMPORALLYINTERPOLATED, 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). |
double |
getValue(ProportionUnit unit)
Gets the proportion in the specified unit. |
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, isSpatiallyInterpolated, isTemporallyInterpolated, multiply, toComposite, toString |
| Methods inherited from class java.lang.Object |
equals, 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),
Comparable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||