This class represents a dimension of a unit of measurement.
The dimension associated to any given quantity are given by the published
Dimension instances. For convenience, a static method
UnitDimension.of(Class) aggregating the results of all
Dimension instances is provided.
Dimension speedDimension
= UnitDimension.of(Speed.class);
| Modifier and Type | Field and Description |
|---|---|
| public static final Dimension | AMOUNT_OF_SUBSTANCE
Holds amount of substance dimension (N). |
| public static final Dimension | ELECTRIC_CURRENT
Holds electric current dimension (I). |
| public static final Dimension | LENGTH
Holds length dimension (L). |
| private static final java. | |
| public static final Dimension | LUMINOUS_INTENSITY
Holds luminous intensity dimension (J). |
| public static final Dimension | MASS
Holds mass dimension (M). |
| public static final Dimension | NONE
Holds dimensionless. |
| private final Unit | pseudoUnit
Holds the pseudo unit associated to this dimension. |
| private static final long | |
| public static final Dimension | TEMPERATURE
Holds temperature dimension (Θ). |
| public static final Dimension | TIME
Holds time dimension (T). |
| Access | Constructor and Description |
|---|---|
| private | UnitDimension(char
the associated symbol. symbol)Returns the unit dimension having the specified symbol. |
| private | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public Dimension | Returns: this / thatthe dimension divisor. that)Implements javax. Returns the quotient of this dimension with the one specified. |
| private UnitDimension | Returns: this / thatthe dimension divisor. that)Returns the quotient of this dimension with the one specified. |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public Map | Returns: the mapping between the base dimensions and their exponent.Implements javax. Returns the fundamental (base) dimensions and their exponent whose product is
this dimension or |
| public int | |
| public Dimension | Returns: this * thatthe dimension multiplicand. that)Implements javax. Returns the product of this dimension with the one specified. |
| private UnitDimension | Returns: this * thatthe dimension multiplicand. that)Returns the product of this dimension with the one specified. |
| public static <Q extends Quantity | Returns: the dimension for the quantity type ornull.the quantity type. quantityType)Returns the dimension for the specified quantity type by aggregating the
results from the default |
| public static Dimension | Returns: the dimension for the given symbol.Returns the dimension for the specified symbol. |
| public UnitDimension | Returns: the result of raising this dimension to the exponent.the exponent. n)Implements javax. Returns this dimension raised to an exponent. |
| public UnitDimension | Returns: the result of taking the given root of this dimension.the root's order. n)Implements javax. Returns the given root of this dimension. |
| public String |
| AMOUNT_OF_SUBSTANCE | back to summary |
|---|---|
| public static final Dimension AMOUNT_OF_SUBSTANCE Holds amount of substance dimension (N).
| |
| ELECTRIC_CURRENT | back to summary |
|---|---|
| public static final Dimension ELECTRIC_CURRENT Holds electric current dimension (I).
| |
| LENGTH | back to summary |
|---|---|
| public static final Dimension LENGTH Holds length dimension (L).
| |
| LOGGER | back to summary |
|---|---|
| private static final java. | |
| LUMINOUS_INTENSITY | back to summary |
|---|---|
| public static final Dimension LUMINOUS_INTENSITY Holds luminous intensity dimension (J). | |
| MASS | back to summary |
|---|---|
| public static final Dimension MASS Holds mass dimension (M).
| |
| NONE | back to summary |
|---|---|
| public static final Dimension NONE Holds dimensionless.
| |
| pseudoUnit | back to summary |
|---|---|
| private final Unit<?> pseudoUnit Holds the pseudo unit associated to this dimension. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| TEMPERATURE | back to summary |
|---|---|
| public static final Dimension TEMPERATURE Holds temperature dimension (Θ).
| |
| TIME | back to summary |
|---|---|
| public static final Dimension TIME Holds time dimension (T).
| |
| UnitDimension | back to summary |
|---|---|
| private UnitDimension(char symbol) Returns the unit dimension having the specified symbol.
| |
| UnitDimension | back to summary |
|---|---|
| private UnitDimension(Unit<?> pseudoUnit) Constructor from pseudo-unit (not visible).
| |
| UnitDimension | back to summary |
|---|---|
| protected UnitDimension() Default Constructor (not visible). | |
| divide | back to summary |
|---|---|
| public Dimension divide(Dimension that) Implements javax. Returns the quotient of this dimension with the one specified.
If the specified dimension is not a | |
| divide | back to summary |
|---|---|
| private UnitDimension divide(UnitDimension that) Returns the quotient of this dimension with the one specified.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getBaseDimensions | back to summary |
|---|---|
| public Map Implements javax. Returns the fundamental (base) dimensions and their exponent whose product is
this dimension or
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| multiply | back to summary |
|---|---|
| public Dimension multiply(Dimension that) Implements javax. Returns the product of this dimension with the one specified.
If the specified dimension is not a | |
| multiply | back to summary |
|---|---|
| private UnitDimension multiply(UnitDimension that) Returns the product of this dimension with the one specified.
| |
| of | back to summary |
|---|---|
| public static <Q extends Quantity Returns the dimension for the specified quantity type by aggregating the
results from the default | |
| parse | back to summary |
|---|---|
| public static Dimension parse(char symbol) Returns the dimension for the specified symbol.
| |
| pow | back to summary |
|---|---|
| public UnitDimension pow(int n) Implements javax. Returns this dimension raised to an exponent.
| |
| root | back to summary |
|---|---|
| public UnitDimension root(int n) Implements javax. Returns the given root of this dimension.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |