|
|||||||||||
| 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.Length
This class represents the extent of something along its greatest dimension or the extent of space between two objects or places.
| Field Summary |
| Fields inherited from class net.agmodel.physical.AbstractQuantity |
COMPLETE, DEVOID, SPATIALLYINTERPOLATED, TEMPORALLYINTERPOLATED, UNINTERPOLATED |
| Constructor Summary | |
Length(Composite c)
Length constructor from Composite quantity. |
|
Length(double value,
LengthUnit unit)
Length constructor. |
|
Length(Length radius,
Angle theta)
Length constructor from a Length and an Angle (arc of a circle). |
|
| Method Summary | |
Length |
add(Length x)
Returns a Length whose value is (this + x). |
int |
compareTo(Length x)
Compares this Length with the specified Length. |
int |
compareTo(Object o)
Compares this Length with the specified Object. |
Length |
divide(double coefficient)
Returns a Length whose value is (this / coefficient). |
Speed |
divide(Duration d)
Returns a Speed whose value is (this / d). |
double |
getValue(LengthUnit unit)
Gets the length in the specified unit. |
static Length |
magnitude(Length x,
Length y)
Converts rectangular coordinates ( x, y)
to polar (rho, theta). |
Volume |
multiply(Area x)
Returns a Volume whose value is (this * x). |
Length |
multiply(double coefficient)
Returns a Length whose value is (this * coefficient). |
Area |
multiply(Length x)
Returns an Area whose value is (this * x). |
void |
setValue(double value,
LengthUnit unit)
Sets this Length using the specified unit. |
Length |
substract(Length x)
Returns a Length 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 Length(double value,
LengthUnit unit)
value - the length in the specified unit.unit - the measurement unit being used.
ArrayIndexOutOfBoundsException - unknown measurement unit
public Length(Length radius,
Angle theta)
radius - the circle radius.theta - the central angle.public Length(Composite c)
c - the quantity to convert.
UnitDimensionException - composite is not a length.Composite| Method Detail |
public double getValue(LengthUnit unit)
unit - the measurement unit being used.
ArrayIndexOutOfBoundsException - unknown measurement unit
public void setValue(double value,
LengthUnit unit)
value - the new length in the specified unit.unit - the measurement unit being used.
ArrayIndexOutOfBoundsException - unknown measurement unitpublic Length add(Length x)
x - the Length to be added.
public Length substract(Length x)
x - the Length to be substracted.
public Length multiply(double coefficient)
coefficient - the dimensionless multiplier.
public Area multiply(Length x)
x - the Length multiplier.
public Volume multiply(Area x)
x - the Area multiplier.
public Length divide(double coefficient)
coefficient - the dimensionless divisor.
ArithmeticException - coefficient == 0.0
public static Length magnitude(Length x,
Length y)
x, y)
to polar (rho, theta).
This method computes the magnitude rho of the polar vector.
x - x coordinate value.y - y coordinate value.
Angle.atan2(Length, Length)public Speed divide(Duration d)
d - the duration divisor.
public int compareTo(Length x)
x - Length to which this Length is to be compared.
public int compareTo(Object o)
compareTo in interface Comparableo - Object to which this Length is to be compared.
ClassCastException - o is not a Length.compareTo(Length),
Comparable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||