Q - The type of the quantityprivate static final class ProxyQuantityFactory.Default<Q extends javax.measure.Quantity<Q>> extends ProxyQuantityFactory<Q>
AbstractMeasurement
sub-types.| Modifier and Type | Field and Description |
|---|---|
(package private) static java.util.HashMap<java.lang.Class,javax.measure.Unit> |
CLASS_TO_METRIC_UNIT |
private javax.measure.Unit<Q> |
metricUnit
The metric unit for quantities created by this factory.
|
private java.lang.Class<Q> |
type
The type of the quantities created by this factory.
|
| Constructor and Description |
|---|
Default(java.lang.Class<Q> type)
Creates a new factory for quantities of the given type.
|
| Modifier and Type | Method and Description |
|---|---|
javax.measure.Quantity<Q> |
create(java.lang.Number value,
javax.measure.Unit<Q> unit) |
javax.measure.Unit<Q> |
getSystemUnit()
Returns the metric unit for quantities produced by this factory or
null if unknown. |
getInstance, setInstanceprivate final java.lang.Class<Q extends javax.measure.Quantity<Q>> type
private final javax.measure.Unit<Q extends javax.measure.Quantity<Q>> metricUnit
static final java.util.HashMap<java.lang.Class,javax.measure.Unit> CLASS_TO_METRIC_UNIT
Default(java.lang.Class<Q> type)
type - The type of the quantities created by this factory.public javax.measure.Unit<Q> getSystemUnit()
ProxyQuantityFactorynull if unknown.getSystemUnit in interface javax.measure.spi.QuantityFactory<Q extends javax.measure.Quantity<Q>>getSystemUnit in class ProxyQuantityFactory<Q extends javax.measure.Quantity<Q>>