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] Provides services for units, quantities or their textual representation.
|
Modifier and Type | Method and 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. |
Unit<Q> |
Unit.divide(double divisor)
Returns the result of dividing this unit by an approximate divisor.
|
Unit<?> |
Unit.divide(Unit<?> divisor)
Returns the quotient of this unit with the one specified.
|
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 . |
Unit<?> |
Unit.inverse()
Returns the inverse of this unit.
|
Unit<Q> |
Unit.multiply(double 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.
|
Unit<?> |
Unit.pow(int n)
Returns a unit equals to this unit raised to an exponent.
|
Unit<?> |
Unit.root(int n)
Returns a unit equals to the given 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.transform(UnitConverter operation)
Returns the unit derived from this unit using the specified converter.
|
Modifier and Type | Method and 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 and Description |
---|---|
Unit<?> |
Unit.divide(Unit<?> divisor)
Returns the quotient of this unit with the one specified.
|
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.
|
boolean |
Unit.isCompatible(Unit<?> that)
Indicates if this unit is compatible with the unit specified.
|
Unit<?> |
Unit.multiply(Unit<?> multiplier)
Returns the product of this unit with the one specified.
|
Quantity<Q> |
Quantity.to(Unit<Q> unit)
Returns this
Quantity converted into another (compatible) Unit . |
Modifier and Type | Method and Description |
---|---|
Unit<?> |
UnitFormat.parse(CharSequence csq)
Parses the text into an instance of
Unit . |
Modifier and Type | Method and 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 and 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.
|
Modifier and Type | Method and 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 and Description |
---|---|
Quantity<Q> |
QuantityFactory.create(Number value,
Unit<Q> unit)
Returns the quantity for the specified number stated in the specified unit.
|
Copyright © 2014–2016 Jean-Marie Dautelle, Werner Keil, V2COM. All rights reserved.