|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Dimension
Dependence of a unit on the base units of a system of units. The dependency is expresses as a product of powers of dimensions corresponding to the base units, omitting any numerical factor.
Concrete dimensions are obtained through the Unit.getDimension() method.
Two units u1 and u2 are compatible if
and only if u1.getDimension().equals(u2.getDimension()).
| Method Summary | |
|---|---|
Dimension |
divide(Dimension that)
Returns the quotient of this dimension with the one specified. |
boolean |
equals(Object object)
Returns true if the given object is also a dimension, and both dimensions
have equal product of powers of base dimensions. |
Map<? extends Dimension,Integer> |
getProductDimensions()
Returns the base dimensions and their exponent whose product is this dimension. |
Dimension |
multiply(Dimension that)
Returns the product of this dimension with the one specified. |
Dimension |
pow(int n)
Returns this dimension raised to an exponent. |
Dimension |
root(int n)
Returns the given root of this dimension. |
| Method Detail |
|---|
Dimension multiply(Dimension that)
that - the dimension multiplicand.
this * thatDimension divide(Dimension that)
that - the dimension divisor.
this / thatDimension pow(int n)
n - the exponent.
Dimension root(int n)
n - the root's order.
ArithmeticException - if n == 0.Map<? extends Dimension,Integer> getProductDimensions()
Special cases, ignoring all dimensions associated to power 0 (if any):
Dimension instance corresponds to the
dimensionless quantity,
then this method returns an empty map.Dimension is itself a base dimension, then this method returns
a singleton map containing this dimension associated to power 1.
null).Unit.getProductUnits()boolean equals(Object object)
true if the given object is also a dimension, and both dimensions
have equal product of powers of base dimensions.
Implementations shall take special care against infinite recursivity if this
Dimension instance is itself contained in the set of keys.
equals in class Objectobject - the other object to compare with this dimension, or null.
true if the other object is also a dimension, and both dimensions
have equal product of powers.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||