Q - The type of the quantity measured by this unit.public final class AnnotatedUnit<Q extends javax.measure.Quantity<Q>> extends AbstractUnit<Q>
This class represents an annotated unit.
Instances of this class are created through the AbstractUnit.annotate(String) method.
name, ONE| Constructor and Description |
|---|
AnnotatedUnit(javax.measure.Unit<?> actualUnit,
String annotation)
Creates an annotated unit equivalent to the specified unit.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object that) |
javax.measure.Unit<?> |
getActualUnit()
Returns the actual unit of this annotated unit (never an annotated unit itself).
|
String |
getAnnotation()
Returns the annotation of this annotated unit.
|
Map<? extends javax.measure.Unit<?>,Integer> |
getBaseUnits() |
javax.measure.Dimension |
getDimension() |
String |
getSymbol() |
javax.measure.UnitConverter |
getSystemConverter()
Returns the converter from this unit to its unscaled
standard unit. |
int |
hashCode() |
AbstractUnit<Q> |
toSystemUnit()
Returns the unscaled standard (SI) unit from which this unit is derived.
|
alternate, annotate, asType, compareTo, divide, divide, getConverterTo, getConverterToAny, getName, getSystemUnit, inverse, isCompatible, isSystemUnit, multiply, multiply, multiply, parse, pow, root, setName, setSymbol, shift, toString, transformpublic AnnotatedUnit(javax.measure.Unit<?> actualUnit, String annotation)
actualUnit - the unit to be annotated.annotation - the annotation.public javax.measure.Unit<?> getActualUnit()
public String getAnnotation()
public Map<? extends javax.measure.Unit<?>,Integer> getBaseUnits()
getBaseUnits in interface javax.measure.Unit<Q extends javax.measure.Quantity<Q>>getBaseUnits in class AbstractUnit<Q extends javax.measure.Quantity<Q>>public AbstractUnit<Q> toSystemUnit()
AbstractUnit static boolean isAngularVelocity(AbstractUnit> unit) {
return unit.toSystemUnit().equals(RADIAN.divide(SECOND)); }
assert(REVOLUTION.divide(MINUTE).isAngularVelocity()); // Returns true.
toSystemUnit in class AbstractUnit<Q extends javax.measure.Quantity<Q>>public javax.measure.Dimension getDimension()
getDimension in interface javax.measure.Unit<Q extends javax.measure.Quantity<Q>>getDimension in class AbstractUnit<Q extends javax.measure.Quantity<Q>>public javax.measure.UnitConverter getSystemConverter()
AbstractUnitstandard unit.getSystemConverter in class AbstractUnit<Q extends javax.measure.Quantity<Q>>getConverterTo(this.toSystemUnit())AbstractUnit.toSystemUnit()public int hashCode()
hashCode in class AbstractUnit<Q extends javax.measure.Quantity<Q>>Copyright © 2005–2016 Jean-Marie Dautelle, Werner Keil, V2COM. All rights reserved.