This class represents an annotated unit.
Instances of this class are created through the AnnotatedUnit#of(Unit, String) method.
| Modifier and Type | Field and Description |
|---|---|
| private final Unit | actualUnit
Holds the actual unit. |
| private final String | annotation
Holds the annotation. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | AnnotatedUnit(Unit<Q>
the unit to be annotated. actualUnit, String the annotation. annotation)Creates an annotated unit equivalent to the specified unit. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. obj)Implements abstract tech. Indicates whether some other object is "equal to" this one. |
| public Unit | Returns: the actual unit.Returns the actual unit of this annotated unit (never an annotated unit itself). |
| public String | |
| public Map | getBaseUnits()
Implements abstract tech. Implements javax. Returns the base units and their exponent whose product is this unit, or |
| public Dimension | getDimension()
Implements abstract tech. Implements javax. Returns the dimension of this unit. |
| public String | getSymbol()
Overrides tech. Implements javax. Returns the symbol (if any) of this unit. |
| public UnitConverter | getSystemConverter()
Implements abstract tech. Returns the converter from this unit to its unscaled |
| public int | hashCode()
Implements abstract tech. Returns a hash code value for this object. |
| public static <Q extends Quantity | |
| public Unit | toSystemUnit()
Implements abstract tech. Returns the unscaled |
| actualUnit | back to summary |
|---|---|
| private final Unit<Q> actualUnit Holds the actual unit. | |
| annotation | back to summary |
|---|---|
| private final String annotation Holds the annotation. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| AnnotatedUnit | back to summary |
|---|---|
| public AnnotatedUnit(Unit<Q> actualUnit, String annotation) Creates an annotated unit equivalent to the specified unit. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Implements abstract tech. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getActualUnit | back to summary |
|---|---|
| public Unit Returns the actual unit of this annotated unit (never an annotated unit itself).
| |
| getAnnotation | back to summary |
|---|---|
| public String getAnnotation() Returns the annotation of this annotated unit.
| |
| getBaseUnits | back to summary |
|---|---|
| public Map Implements abstract tech. Implements javax. Doc from javax. Returns the base units and their exponent whose product is this unit, or | |
| getDimension | back to summary |
|---|---|
| public Dimension getDimension() Implements abstract tech. Implements javax. Doc from javax. Returns the dimension of this unit. Two units | |
| getSymbol | back to summary |
|---|---|
| public String getSymbol() Overrides tech. Implements javax. Doc from javax. Returns the symbol (if any) of this unit. This method returns | |
| getSystemConverter | back to summary |
|---|---|
| public UnitConverter getSystemConverter() Implements abstract tech. Doc from tech. Returns the converter from this unit to its unscaled
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Implements abstract tech. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| of | back to summary |
|---|---|
| public static <Q extends Quantity Creates an annotated unit equivalent to the specified unit.
| |
| toSystemUnit | back to summary |
|---|---|
| public Unit Implements abstract tech. Doc from tech. Returns the unscaled | |