Top Description Methods
javax.measure

public Interface Dimension

Imports
java.util.Map

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()).

Authors
Jean-Marie Dautelle, Werner Keil
Since
1.0
Version
1.0, August 8, 2016
See Also
Unit, Wikipedia: Dimensional Analysis

Method Summary

Modifier and TypeMethod and Description
public Dimension

Returns:

this / divisor
divide
(Dimension
the dimension divisor.
divisor
)

Returns the quotient of this dimension with the one specified.

public Map<? extends Dimension, Integer>

Returns:

the mapping between the fundamental dimensions and their exponent.
getBaseDimensions
()

Returns the (fundamental) base dimensions and their exponent whose product is this dimension, or null if this dimension is a base dimension.

public Dimension

Returns:

this * multiplicand
multiply
(Dimension
the dimension multiplicand.
multiplicand
)

Returns the product of this dimension with the one specified.

public Dimension

Returns:

thisn
pow
(int
power to raise this Dimension to.
n
)

Returns this dimension raised to an exponent.

public Dimension

Returns:

the result of taking the given root of this dimension.
root
(int
the root's order.
n
)

Returns the given root of this dimension.

Method Detail

divideback to summary
public Dimension divide(Dimension divisor)

Returns the quotient of this dimension with the one specified.

Parameters
divisor:Dimension

the dimension divisor.

Returns:Dimension

this / divisor

getBaseDimensionsback to summary
public Map<? extends Dimension, Integer> getBaseDimensions()

Returns the (fundamental) base dimensions and their exponent whose product is this dimension, or null if this dimension is a base dimension.

Returns:Map<? extends Dimension, Integer>

the mapping between the fundamental dimensions and their exponent.

multiplyback to summary
public Dimension multiply(Dimension multiplicand)

Returns the product of this dimension with the one specified.

Parameters
multiplicand:Dimension

the dimension multiplicand.

Returns:Dimension

this * multiplicand

powback to summary
public Dimension pow(int n)

Returns this dimension raised to an exponent. (thisn)

Parameters
n:int

power to raise this Dimension to.

Returns:Dimension

thisn

rootback to summary
public Dimension root(int n)

Returns the given root of this dimension.

Parameters
n:int

the root's order.

Returns:Dimension

the result of taking the given root of this dimension.

Exceptions
ArithmeticException:
if n == 0.