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