public final class MixedRadix<Q extends javax.measure.Quantity<Q>> extends Object
MixedQuantity| Modifier and Type | Class and Description |
|---|---|
static class |
MixedRadix.PrimaryUnitPick |
| Modifier and Type | Field and Description |
|---|---|
static MixedRadix.PrimaryUnitPick |
PRIMARY_UNIT_PICK |
static MixedRadix.PrimaryUnitPick |
PRIMARY_UNIT_PICK_DEFAULT |
| Modifier and Type | Method and Description |
|---|---|
CompoundQuantity<Q> |
createCompoundQuantity(Number... values)
Deprecated.
|
CompoundQuantity<Q> |
createCompoundQuantity(Number[] values,
javax.measure.Quantity.Scale scale)
Deprecated.
use #getMixedQuantity
|
MixedQuantity<Q> |
createMixedQuantity(Number... values) |
MixedQuantity<Q> |
createMixedQuantity(Number[] values,
javax.measure.Quantity.Scale scale)
|
javax.measure.Quantity<Q> |
createQuantity(Number... values) |
javax.measure.Quantity<Q> |
createQuantity(Number[] values,
javax.measure.Quantity.Scale scale)
Creates a
Quantity from given values and scale. |
Number[] |
extractValues(javax.measure.Quantity<Q> quantity) |
Number[] |
extractValuesInto(javax.measure.Quantity<Q> quantity,
Number[] target) |
javax.measure.Unit<Q> |
getPrimaryUnit() |
List<javax.measure.Unit<Q>> |
getUnits() |
MixedRadix<Q> |
mix(javax.measure.Unit<Q> mixedRadixUnit) |
static <X extends javax.measure.Quantity<X>> |
of(Collection<javax.measure.Unit<X>> units) |
static <X extends javax.measure.Quantity<X>> |
of(javax.measure.Unit<X>... units) |
static <X extends javax.measure.Quantity<X>> |
of(javax.measure.Unit<X> leadingUnit) |
static <X extends javax.measure.Quantity<X>> |
ofPrimary(javax.measure.Unit<X> primaryUnit) |
String |
toString() |
public static final MixedRadix.PrimaryUnitPick PRIMARY_UNIT_PICK_DEFAULT
public static MixedRadix.PrimaryUnitPick PRIMARY_UNIT_PICK
public static <X extends javax.measure.Quantity<X>> MixedRadix<X> of(javax.measure.Unit<X> leadingUnit)
@SafeVarargs public static <X extends javax.measure.Quantity<X>> MixedRadix<X> of(javax.measure.Unit<X>... units)
public static <X extends javax.measure.Quantity<X>> MixedRadix<X> of(Collection<javax.measure.Unit<X>> units)
public static <X extends javax.measure.Quantity<X>> MixedRadix<X> ofPrimary(javax.measure.Unit<X> primaryUnit)
public MixedRadix<Q> mix(javax.measure.Unit<Q> mixedRadixUnit)
public javax.measure.Unit<Q> getPrimaryUnit()
public javax.measure.Quantity<Q> createQuantity(Number[] values, javax.measure.Quantity.Scale scale)
Quantity from given values and scale.values - - numbers corresponding to the radices in most significant first order,
allowed to be of shorter length than the total count of radices of this MixedRadix instancescale - - the Quantity.Scale to be used for the returned Quantitypublic javax.measure.Quantity<Q> createQuantity(Number... values)
public MixedQuantity<Q> createMixedQuantity(Number[] values, javax.measure.Quantity.Scale scale)
MixedQuantity from given values and scale.
Note: Not every MixedQuantity can be represented by a MixedRadix.
MixedRadix strictly requires its coefficients to be in decreasing order of significance,
while a MixedQuantity in principle does not.
values - - numbers corresponding to the radix coefficients in most significant first order,
allowed to be of shorter length than the total count of radix coefficients of this
MixedRadix instancescale - - the Quantity.Scale to be used for the elements of the returned MixedQuantitypublic MixedQuantity<Q> createMixedQuantity(Number... values)
public CompoundQuantity<Q> createCompoundQuantity(Number[] values, javax.measure.Quantity.Scale scale)
CompoundQuantity from given values and scale.
Note: Not every CompoundQuantity can be represented by a MixedRadix.
MixedRadix strictly requires its coefficients to be in decreasing order of significance,
while a CompoundQuantity in principle does not.
values - - numbers corresponding to the radix coefficients in most significant first order,
allowed to be of shorter length than the total count of radix coefficients of this
MixedRadix instancescale - - the Quantity.Scale to be used for the elements of the returned CompoundQuantity@Deprecated public CompoundQuantity<Q> createCompoundQuantity(Number... values)
public Number[] extractValues(javax.measure.Quantity<Q> quantity)
public Number[] extractValuesInto(javax.measure.Quantity<Q> quantity, Number[] target)
Copyright © 2005–2022 Units of Measurement project. All rights reserved.