Package javax.measure
Interface Dimension
-
public interface DimensionRepresents the dimension of a unit.Concrete dimensions are obtained through the
Unit.getDimension()method.Two units
u1andu2are compatible if and only ifu1.getDimension().equals(u2.getDimension()).- Since:
- 1.0
- Version:
- 1.0, August 8, 2016
- See Also:
Unit, Wikipedia: Dimensional Analysis
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Dimensiondivide(Dimension divisor)Returns the quotient of this dimension with the one specified.java.util.Map<? extends Dimension,java.lang.Integer>getBaseDimensions()Returns the (fundamental) base dimensions and their exponent whose product is this dimension, ornullif this dimension is a base dimension.Dimensionmultiply(Dimension multiplicand)Returns the product of this dimension with the one specified.Dimensionpow(int n)Returns this dimension raised to an exponent.Dimensionroot(int n)Returns the given root of this dimension.
-
-
-
Method Detail
-
multiply
Dimension multiply(Dimension multiplicand)
Returns the product of this dimension with the one specified.- Parameters:
multiplicand- the dimension multiplicand.- Returns:
this * multiplicand
-
divide
Dimension divide(Dimension divisor)
Returns the quotient of this dimension with the one specified.- Parameters:
divisor- the dimension divisor.- Returns:
this / divisor
-
pow
Dimension pow(int n)
Returns this dimension raised to an exponent. (thisn)- Parameters:
n- power to raise thisDimensionto.- Returns:
- thisn
-
root
Dimension root(int n)
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:
java.lang.ArithmeticException- ifn == 0.
-
getBaseDimensions
java.util.Map<? extends Dimension,java.lang.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.
-
-