Instances of this class are usually obtained through the Unit#getConverterTo(Unit) method.
Unit, Wikipedia: Conversion of units
| Modifier and Type | Method and Description |
|---|---|
| public UnitConverter | Returns: the concatenation of this converter with the other converter.the other converter to concatenate with this converter. converter)Concatenates this converter with another converter. |
| public Number | |
| public double | Returns: thedouble value after conversion.the numeric value to convert. value)Converts a |
| public List | Returns: the list of fundamental converters which concatenated make up this converter.
Returns the steps of fundamental converters making up this converter or |
| public UnitConverter | |
| public boolean | Returns: true if this converter is an identity converter.Indicates if this converter is an identity converter. |
| public boolean | Returns: true if this converter represents a linear transformation;
false otherwise.Indicates whether this converter represents a (one-dimensional) linear transformation, that is a linear map (wikipedia) from a one-dimensional vector space (a scalar) to a one-dimensional vector space. |
| concatenate | back to summary |
|---|---|
| public UnitConverter concatenate(UnitConverter converter) Concatenates this converter with another converter. The resulting converter is equivalent to first converting by the specified converter (right converter), and then converting by this converter (left converter).
| |
| convert | back to summary |
|---|---|
| public Number convert(Number value) Converts a | |
| convert | back to summary |
|---|---|
| public double convert(double value) Converts a
| |
| getConversionSteps | back to summary |
|---|---|
| public List
Returns the steps of fundamental converters making up this converter or
For example,
| |
| inverse | back to summary |
|---|---|
| public UnitConverter inverse() Returns the inverse of this converter. If
| |
| isIdentity | back to summary |
|---|---|
| public boolean isIdentity() Indicates if this converter is an identity converter. The identity converter returns its input argument ( Note Identity converters are also always 'linear', see
| |
| isLinear | back to summary |
|---|---|
| public boolean isLinear() Indicates whether this converter represents a (one-dimensional) linear transformation, that is a linear map (wikipedia) from a one-dimensional vector space (a scalar) to a one-dimensional vector space. Typically from 'R' to 'R', with 'R' the real numbers. Given such a 'linear' converter 'A', let 'u', 'v' and 'r' be arbitrary numbers, then the following must hold by definition:
Given a second 'linear' converter 'B', commutativity of composition follows by above definition:
A(B(u)) == B(A(u)), meaning
for 'A' and 'B' the order of their composition does not matter. Expressed as Java code:
UnitConverter#concatenate(UnitConverter).
| |