All Packages Class Hierarchy This Package Previous Next Index
Class units.Measurement
java.lang.Object
|
+----units.Measurement
- public class Measurement
- extends Object
- implements Cloneable, Serializable
This class implements any quantity as the pair <µ,
u>. It provides the full set of operators including
addition and subtration of equally dimensioned quantities. It also
has a method convert(Unit u_prime)
to convert a
measurement value µ to µ' for another
commensurable unit u'.
- Version:
- $Id: Measurement.java,v 1.2 1998/07/28 22:36:58 schadow Exp $
- Author:
- Gunther Schadow
-
Measurement()
-
-
Measurement(double)
-
-
Measurement(double, String)
-
-
Measurement(double, Unit)
-
-
add(Measurement)
- Adds to this measurement m1 another measurement m2.
-
assign(Measurement)
- Sets this measurement to be equal to another measurement m.
-
clone()
-
-
dim()
- Returns the dimension of this measurement
-
div(Measurement)
- Divides this measurement m1 with another measurement m2
-
equals(Measurement)
- Tests for equality of this measurement m1 and another measurement m2.
-
inv()
- Invert this measurement with respect to multiplication.
-
minus()
- Invert this measurement m with respect to addition.
-
mul(double)
- Multiplies this measurement m with a scalar s.
-
mul(Measurement)
- Multiplies this measurement m1 with another measurement m2
-
pow(int)
- Raises this measurement m to a power p.
-
sub(Measurement)
- Subtracts from this measurement m1 another measurement m2.
Measurement
public Measurement(double _mu,
Unit _u)
Measurement
public Measurement(double _mu,
String _u)
Measurement
public Measurement(double _mu)
Measurement
public Measurement()
add
public Measurement add(Measurement m2)
- Adds to this measurement m1 another measurement m2.
- Returns:
- the sum m1 + m2.
sub
public Measurement sub(Measurement m2)
- Subtracts from this measurement m1 another measurement m2.
- Returns:
- the difference m1 - m2.
minus
public Measurement minus()
- Invert this measurement m with respect to addition.
- Returns:
- -m.
mul
public Measurement mul(double s)
- Multiplies this measurement m with a scalar s.
- Returns:
- the product m * s.
mul
public Measurement mul(Measurement m2)
- Multiplies this measurement m1 with another measurement m2
- Returns:
- the product m1 * m2
div
public Measurement div(Measurement m2)
- Divides this measurement m1 with another measurement m2
- Returns:
- the quotient m1 / m2
inv
public Measurement inv()
- Invert this measurement with respect to multiplication.
- Returns:
- 1/u.
pow
public Measurement pow(int p)
- Raises this measurement m to a power p.
- Returns:
- the power u^p.
equals
public boolean equals(Measurement m2)
- Tests for equality of this measurement m1 and another measurement m2.
- Returns:
- true if m1 and m2 are equal, false otherwise.
assign
public Measurement assign(Measurement m)
- Sets this measurement to be equal to another measurement m.
- Returns:
- this measurement after assignment to m
clone
public Object clone()
- Overrides:
- clone in class Object
dim
public Dimension dim()
- Returns the dimension of this measurement
All Packages Class Hierarchy This Package Previous Next Index