|
||||||||||
| 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.Speed
This class represents a distance traveled divided by the time of travel.
Length,
Duration,
Serialized Form| 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 | |
Speed(Composite c)
Speed constructor from Composite quantity. |
|
Speed(double value,
SpeedUnit unit)
Speed constructor. |
|
| Method Summary | |
Speed |
add(Speed x)
Returns a Speed whose value is (this + x). |
int |
compareTo(Object o)
Compares this Speed with the specified Object. |
int |
compareTo(Speed x)
Compares this Speed with the specified Speed. |
Speed |
divide(double coefficient)
Returns a Speed whose value is (this / coefficient). |
Acceleration |
divide(Duration d)
Returns an Acceleration whose value is (this / d). |
protected int |
getDimensionSI()
Gets the SI dimension of this Speed. |
double |
getValue(SpeedUnit unit)
Gets the speed in the specified unit. |
protected double |
getValueSI()
Gets the speed in SI units. |
Speed |
multiply(double coefficient)
Returns a Speed whose value is (this * coefficient). |
Length |
multiply(Duration d)
Returns a Length whose value is (this * d). |
void |
setValue(double value,
SpeedUnit unit)
Sets this Speed using the specified unit. |
Speed |
substract(Speed x)
Returns a Speed 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 Speed(double value,
SpeedUnit unit)
value - the speed in the specified unit.unit - the measurement unit being used.
ArrayIndexOutOfBoundsException - unknown measurement unitpublic Speed(Composite c)
c - the quantity to convert.
UnitDimensionException - composite is not a speed.Composite| Method Detail |
public double getValue(SpeedUnit unit)
unit - the measurement unit being used.
ArrayIndexOutOfBoundsException - unknown measurement unit
public void setValue(double value,
SpeedUnit unit)
value - the new speed in the specified unit.unit - the measurement unit being used.
ArrayIndexOutOfBoundsException - unknown measurement unitpublic Speed add(Speed x)
x - the Speed to be added.
public Speed substract(Speed x)
x - the Speed to be substracted.
public Speed multiply(double coefficient)
coefficient - the dimensionless multiplier.
public Speed divide(double coefficient)
coefficient - the dimensionless divisor.
ArithmeticException - coefficient == 0.0public Length multiply(Duration d)
d - the duration multiplier.
public Acceleration divide(Duration d)
d - the duration divisor.
public int compareTo(Speed x)
x - Speed to which this Speed is to be compared.
public int compareTo(Object o)
compareTo in interface Comparableo - Object to which this Speed is to be compared.
ClassCastException - o is not a Speed.compareTo(Speed),
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 | |||||||||