Package | Description |
---|---|
javax.measure |
Specifies Java packages for the programmatic, type safe handling
of quantities and their expression as values of units.
|
javax.measure.format |
[OPTIONAL] Provides Formatting and Parsing functionality for units, quantities, dimensions or their textual representation.
|
javax.measure.spi |
[OPTIONAL] The Units of Measurement SPI.
|
Modifier and Type | Method | Description |
---|---|---|
Unit<Q> |
Unit.alternate(String symbol) |
Returns a system unit equivalent to this unscaled standard unit but used in expressions to distinguish between quantities of a different nature
but of the same dimensions.
|
<T extends Quantity<T>> |
Unit.asType(Class<T> type) |
Casts this unit to a parameterized unit of specified nature or throw a
ClassCastException if the dimension of the specified quantity and
this unit's dimension do not match. |
static <Q extends Quantity<Q>> |
MetricPrefix.ATTO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-18 |
static <Q extends Quantity<Q>> |
MetricPrefix.CENTI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-2 |
static <Q extends Quantity<Q>> |
MetricPrefix.DECI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-1 |
static <Q extends Quantity<Q>> |
MetricPrefix.DEKA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
101 |
Unit<Q> |
Unit.divide(double divisor) |
Returns the result of dividing this unit by an approximate divisor.
|
Unit<Q> |
Unit.divide(Number divisor) |
Returns the result of dividing this unit by a divisor.
|
Unit<?> |
Unit.divide(Unit<?> divisor) |
Returns the quotient of this unit with the one specified.
|
static <Q extends Quantity<Q>> |
MetricPrefix.EXA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1018 |
static <Q extends Quantity<Q>> |
BinaryPrefix.EXBI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10246 (binary prefix). |
static <Q extends Quantity<Q>> |
MetricPrefix.FEMTO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-15 |
Unit<Q> |
Unit.getSystemUnit() |
Returns the unscaled system unit from which this unit is derived.
|
Unit<Q> |
Quantity.getUnit() |
Returns the unit of this
Quantity . |
static <Q extends Quantity<Q>> |
BinaryPrefix.GIBI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10243 (binary prefix). |
static <Q extends Quantity<Q>> |
MetricPrefix.GIGA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
109 |
static <Q extends Quantity<Q>> |
MetricPrefix.HECTO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
102 |
Unit<?> |
Unit.inverse() |
Returns the reciprocal (multiplicative inverse) of this unit.
|
static <Q extends Quantity<Q>> |
BinaryPrefix.KIBI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1024 (binary prefix). |
static <Q extends Quantity<Q>> |
MetricPrefix.KILO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
103 |
static <Q extends Quantity<Q>> |
BinaryPrefix.MEBI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10242 (binary prefix). |
static <Q extends Quantity<Q>> |
MetricPrefix.MEGA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
106 |
static <Q extends Quantity<Q>> |
MetricPrefix.MICRO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-6 |
static <Q extends Quantity<Q>> |
MetricPrefix.MILLI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-3 |
Unit<Q> |
Unit.multiply(double multiplier) |
Returns the result of multiplying this unit by the specified factor.
|
Unit<Q> |
Unit.multiply(Number multiplier) |
Returns the result of multiplying this unit by the specified factor.
|
Unit<?> |
Unit.multiply(Unit<?> multiplier) |
Returns the product of this unit with the one specified.
|
static <Q extends Quantity<Q>> |
MetricPrefix.NANO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-9 |
static <Q extends Quantity<Q>> |
BinaryPrefix.PEBI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10245 (binary prefix). |
static <Q extends Quantity<Q>> |
MetricPrefix.PETA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1015 |
static <Q extends Quantity<Q>> |
MetricPrefix.PICO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-12 |
Unit<?> |
Unit.pow(int n) |
Returns an unit raised to the n-th (integer) power of this unit.
|
Unit<Q> |
Unit.prefix(Prefix prefix) |
Returns a new unit equal to this unit prefixed by the specified
prefix . |
Unit<?> |
Unit.root(int n) |
Returns an unit that is the n-th (integer) root of this unit.
|
Unit<Q> |
Unit.shift(double offset) |
Returns the result of setting the origin of the scale of measurement to the given value.
|
Unit<Q> |
Unit.shift(Number offset) |
Returns the result of setting the origin of the scale of measurement to the given value.
|
static <Q extends Quantity<Q>> |
BinaryPrefix.TEBI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10244 (binary prefix). |
static <Q extends Quantity<Q>> |
MetricPrefix.TERA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1012 |
Unit<Q> |
Unit.transform(UnitConverter operation) |
Returns the unit derived from this unit using the specified converter.
|
static <Q extends Quantity<Q>> |
BinaryPrefix.YOBI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10248 (binary prefix). |
static <Q extends Quantity<Q>> |
MetricPrefix.YOCTO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-24 |
static <Q extends Quantity<Q>> |
MetricPrefix.YOTTA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1024 |
static <Q extends Quantity<Q>> |
BinaryPrefix.ZEBI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10247 (binary prefix). |
static <Q extends Quantity<Q>> |
MetricPrefix.ZEPTO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-21 |
static <Q extends Quantity<Q>> |
MetricPrefix.ZETTA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1021 |
Modifier and Type | Method | Description |
---|---|---|
Map<? extends Unit<?>,Integer> |
Unit.getBaseUnits() |
Returns the base units and their exponent whose product is this unit, or
null if this unit is a base unit (not a product of existing
units). |
Modifier and Type | Method | Description |
---|---|---|
static <Q extends Quantity<Q>> |
MetricPrefix.ATTO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-18 |
static <Q extends Quantity<Q>> |
MetricPrefix.CENTI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-2 |
static <Q extends Quantity<Q>> |
MetricPrefix.DECI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-1 |
static <Q extends Quantity<Q>> |
MetricPrefix.DEKA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
101 |
Unit<?> |
Unit.divide(Unit<?> divisor) |
Returns the quotient of this unit with the one specified.
|
static <Q extends Quantity<Q>> |
MetricPrefix.EXA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1018 |
static <Q extends Quantity<Q>> |
BinaryPrefix.EXBI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10246 (binary prefix). |
static <Q extends Quantity<Q>> |
MetricPrefix.FEMTO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-15 |
UnitConverter |
Unit.getConverterTo(Unit<Q> that) |
Returns a converter of numeric values from this unit to another unit of same type.
|
UnitConverter |
Unit.getConverterToAny(Unit<?> that) |
Returns a converter from this unit to the specified unit of type unknown.
|
static <Q extends Quantity<Q>> |
BinaryPrefix.GIBI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10243 (binary prefix). |
static <Q extends Quantity<Q>> |
MetricPrefix.GIGA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
109 |
static <Q extends Quantity<Q>> |
MetricPrefix.HECTO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
102 |
boolean |
Unit.isCompatible(Unit<?> that) |
Indicates if this unit is compatible with the unit specified.
|
static <Q extends Quantity<Q>> |
BinaryPrefix.KIBI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1024 (binary prefix). |
static <Q extends Quantity<Q>> |
MetricPrefix.KILO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
103 |
static <Q extends Quantity<Q>> |
BinaryPrefix.MEBI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10242 (binary prefix). |
static <Q extends Quantity<Q>> |
MetricPrefix.MEGA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
106 |
static <Q extends Quantity<Q>> |
MetricPrefix.MICRO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-6 |
static <Q extends Quantity<Q>> |
MetricPrefix.MILLI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-3 |
Unit<?> |
Unit.multiply(Unit<?> multiplier) |
Returns the product of this unit with the one specified.
|
static <Q extends Quantity<Q>> |
MetricPrefix.NANO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-9 |
static <Q extends Quantity<Q>> |
BinaryPrefix.PEBI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10245 (binary prefix). |
static <Q extends Quantity<Q>> |
MetricPrefix.PETA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1015 |
static <Q extends Quantity<Q>> |
MetricPrefix.PICO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-12 |
static <Q extends Quantity<Q>> |
BinaryPrefix.TEBI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10244 (binary prefix). |
static <Q extends Quantity<Q>> |
MetricPrefix.TERA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1012 |
Quantity<Q> |
Quantity.to(Unit<Q> unit) |
Returns this
Quantity converted into another (compatible)
Unit . |
static <Q extends Quantity<Q>> |
BinaryPrefix.YOBI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10248 (binary prefix). |
static <Q extends Quantity<Q>> |
MetricPrefix.YOCTO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-24 |
static <Q extends Quantity<Q>> |
MetricPrefix.YOTTA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1024 |
static <Q extends Quantity<Q>> |
BinaryPrefix.ZEBI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10247 (binary prefix). |
static <Q extends Quantity<Q>> |
MetricPrefix.ZEPTO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-21 |
static <Q extends Quantity<Q>> |
MetricPrefix.ZETTA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1021 |
Modifier and Type | Method | Description |
---|---|---|
Unit<?> |
UnitFormat.parse(CharSequence csq) |
Parses the text into an instance of
Unit . |
Unit<?> |
UnitFormat.parse(CharSequence csq,
ParsePosition pos) |
Parses a portion of the specified
CharSequence from the specified position to produce a Unit . |
Modifier and Type | Method | Description |
---|---|---|
String |
UnitFormat.format(Unit<?> unit) |
Formats the specified
Unit . |
Appendable |
UnitFormat.format(Unit<?> unit,
Appendable appendable) |
Formats the specified
Unit . |
void |
UnitFormat.label(Unit<?> unit,
String label) |
Attaches a system-wide label to the specified unit.
|
Modifier and Type | Method | Description |
---|---|---|
Unit<Q> |
QuantityFactory.getSystemUnit() |
Returns the system unit for quantities produced by this factory or
null if unknown. |
<Q extends Quantity<Q>> |
SystemOfUnits.getUnit(Class<Q> quantityType) |
Returns the default unit for the specified quantity or
null if none is defined for the given quantity in this unit system. |
Unit<?> |
SystemOfUnits.getUnit(String string) |
Returns a unit with the given string representation or
null if none is found in this unit system. |
Modifier and Type | Method | Description |
---|---|---|
Set<? extends Unit<?>> |
SystemOfUnits.getUnits() |
Returns a read only view over the units explicitly defined by this system.
|
Set<? extends Unit<?>> |
SystemOfUnits.getUnits(Dimension dimension) |
Returns the units defined in this system having the specified dimension (convenience method).
|
Modifier and Type | Method | Description |
---|---|---|
Quantity<Q> |
QuantityFactory.create(Number value,
Unit<Q> unit) |
Returns the quantity for the specified number stated in the specified unit.
|
Quantity<Q> |
QuantityFactory.create(Number value,
Unit<Q> unit,
Quantity.Scale scale) |
Returns the quantity for the specified number stated in the specified unit and scale.
|
Copyright © 2014–2019 Jean-Marie Dautelle, Werner Keil, Otavio Santana. All rights reserved.