Uses of Interface
javax.measure.Unit
Packages that use Unit
Package
Description
Specifies Java packages for the programmatic, type safe handling
of quantities and their expression as values of units.
[OPTIONAL] Provides Formatting and Parsing functionality for units, quantities, dimensions or their textual representation.
[OPTIONAL] The Units of Measurement SPI.
-
Uses of Unit in javax.measure
Methods in javax.measure that return UnitModifier and TypeMethodDescriptionReturns 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.Casts this unit to a parameterized unit of specified nature or throw aClassCastException
if the dimension of the specified quantity and this unit's dimension do not match.Unit.divide
(double divisor) Returns the result of dividing this unit by an approximate divisor.Unit
<?> Returns the quotient of this unit with the one specified.Unit.getSystemUnit()
Returns the unscaled system unit from which this unit is derived.Quantity.getUnit()
Returns the unit of thisQuantity
.Unit
<?> Unit.inverse()
Returns the inverse of this unit.Unit.multiply
(double multiplier) Returns the result of multiplying this unit by the specified factor.Unit
<?> 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.shift
(double offset) Returns the result of setting the origin of the scale of measurement to the given value.Unit.transform
(UnitConverter operation) Returns the unit derived from this unit using the specified converter.Methods in javax.measure that return types with arguments of type UnitModifier and TypeMethodDescriptionUnit.getBaseUnits()
Returns the base units and their exponent whose product is this unit, ornull
if this unit is a base unit (not a product of existing units).Methods in javax.measure with parameters of type UnitModifier and TypeMethodDescriptionUnit
<?> Returns the quotient of this unit with the one specified.Unit.getConverterTo
(Unit<Q> that) Returns a converter of numeric values from this unit to another unit of same type.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
<?> Returns the product of this unit with the one specified.Returns thisQuantity
converted into another (compatible)Unit
. -
Uses of Unit in javax.measure.format
Methods in javax.measure.format that return UnitModifier and TypeMethodDescriptionUnit
<?> UnitFormat.parse
(CharSequence csq) Parses the text into an instance ofUnit
.Methods in javax.measure.format with parameters of type Unit -
Uses of Unit in javax.measure.spi
Methods in javax.measure.spi that return UnitModifier and TypeMethodDescriptionQuantityFactory.getSystemUnit()
Returns the system unit for quantities produced by this factory ornull
if unknown.Returns the default unit for the specified quantity.Methods in javax.measure.spi that return types with arguments of type UnitModifier and TypeMethodDescriptionSystemOfUnits.getUnits()
Returns a read only view over the units explicitly defined by this system.Returns the units defined in this system having the specified dimension (convenience method).Methods in javax.measure.spi with parameters of type Unit