|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.measure.Measure<double[],Q>
javax.measure.VectorMeasure<Q>
public abstract class VectorMeasure<Q extends Quantity>
This class represents a measurement vector of two or more dimensions.
For example:[code]
VectorMeasure
Subclasses may provide fixed dimensions specializations:[code]
class Velocity2D extends VectorMeasure
Measurement vectors may use compound units
:[code]
VectorMeasure
Instances of this class (and sub-classes) are immutable.
Constructor Summary | |
---|---|
protected |
VectorMeasure()
Default constructor (for sub-classes). |
Method Summary | ||
---|---|---|
abstract double |
doubleValue(Unit<Q> unit)
Returns the norm of this measurement vector stated in the specified unit. |
|
abstract VectorMeasure<Q> |
to(Unit<Q> unit)
Returns the measurement vector equivalent to this one but stated in the specified unit. |
|
java.lang.String |
toString()
Returns the String representation of this measurement
vector (for example [2.3 m/s, 5.6 m/s] ). |
|
static
|
valueOf(double[] components,
Unit<Q> unit)
Returns a multi-dimensional measurement vector. |
|
static
|
valueOf(double x,
double y,
double z,
Unit<Q> unit)
Returns a 3-dimensional measurement vector. |
|
static
|
valueOf(double x,
double y,
Unit<Q> unit)
Returns a 2-dimensional measurement vector. |
Methods inherited from class javax.measure.Measure |
---|
compareTo, equals, floatValue, getUnit, getValue, hashCode, intValue, longValue, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected VectorMeasure()
Method Detail |
---|
public static <Q extends Quantity> VectorMeasure<Q> valueOf(double x, double y, Unit<Q> unit)
x
- the first vector component value.y
- the second vector component value.unit
- the measurement unit.public static <Q extends Quantity> VectorMeasure<Q> valueOf(double x, double y, double z, Unit<Q> unit)
x
- the first vector component value.y
- the second vector component value.z
- the third vector component value.unit
- the measurement unit.public static <Q extends Quantity> VectorMeasure<Q> valueOf(double[] components, Unit<Q> unit)
components
- the vector component values.unit
- the measurement unit.public abstract VectorMeasure<Q> to(Unit<Q> unit)
to
in class Measure<double[],Q extends Quantity>
unit
- the new measurement unit.
public abstract double doubleValue(Unit<Q> unit)
doubleValue
in interface Measurable<Q extends Quantity>
doubleValue
in class Measure<double[],Q extends Quantity>
unit
- the unit in which the norm is stated.
|this|
public java.lang.String toString()
String
representation of this measurement
vector (for example [2.3 m/s, 5.6 m/s]
).
toString
in class Measure<double[],Q extends Quantity>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |