Package javax.measure
Interface Dimension
public interface Dimension
Represents the dimension of a unit.
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()).
- Since:
- 1.0
- Version:
- 1.0, August 8, 2016
- Author:
- Jean-Marie Dautelle, Werner Keil
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the quotient of this dimension with the one specified.Returns the (fundamental) base dimensions and their exponent whose product is this dimension, ornullif this dimension is a base dimension.Returns the product of this dimension with the one specified.pow(int n) Returns this dimension raised to an exponent.root(int n) Returns the given root of this dimension.
-
Method Details
-
multiply
Returns the product of this dimension with the one specified.- Parameters:
multiplicand- the dimension multiplicand.- Returns:
this * multiplicand
-
divide
Returns the quotient of this dimension with the one specified.- Parameters:
divisor- the dimension divisor.- Returns:
this / divisor
-
pow
Returns this dimension raised to an exponent.(thisn)- Parameters:
n- power to raise thisDimensionto.- Returns:
thisn
-
root
Returns the given root of this dimension.- Parameters:
n- the root's order.- Returns:
- the result of taking the given root of this dimension.
- Throws:
ArithmeticException- ifn == 0.
-
getBaseDimensions
Map<? extends Dimension,Integer> getBaseDimensions()Returns the (fundamental) base dimensions and their exponent whose product is this dimension, ornullif this dimension is a base dimension.- Returns:
- the mapping between the fundamental dimensions and their exponent.
-