| This class represents a measurement vector of two or more dimensions.
For example:[code]
VectorMeasure dimension = VectorMeasure.valueOf(12.0, 30.0, 40.0, MILLIMETER);
VectorMeasure v2d = VectorMeasure.valueOf(-2.2, -3.0, KNOTS);
VectorMeasure c2d = VectorMeasure.valueOf(-7.3, 3.5, NANOAMPERE);
[/code]
Subclasses may provide fixed dimensions specializations:[code]
class Velocity2D extends VectorMeasure {
public Velocity2D(double x, double y, Unit unit) {
...
}
}
[/code]
Measurement vectors may use
CompoundUnit compound units :[code]
VectorMeasure latLong = VectorMeasure.valueOf(12.345, 22.23, DEGREE_ANGLE);
Unit HOUR_MINUTE_SECOND_ANGLE = DEGREE_ANGLE.compound(MINUTE_ANGLE).compound(SECOND_ANGLE);
System.out.println(latLong.to(HOUR_MINUTE_SECOND_ANGLE));
> [12°19'42", 22°12'48"] [/code]
Instances of this class (and sub-classes) are immutable.
author: Jean-Marie Dautelle version: 4.3, October 3, 2007 |