Package javax.measure.test.unit
Class BaseUnit<Q extends Quantity<Q>>
- Type Parameters:
Q
- The type of the quantity measured by this unit.
- All Implemented Interfaces:
Unit<Q>
- Direct Known Subclasses:
DistanceUnit
,MassUnit
,TimeUnit
Building blocks on top of which all others units are created. Base units are always unscaled metric units.
When using the standard model (default), all seven base units are dimensionally independent.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Jean-Marie Dautelle, Werner Keil
- See Also:
-
Field Summary
Fields inherited from class TestUnit
multFactor, name, ONE, symbol
-
Constructor Summary
-
Method Summary
Methods inherited from class TestUnit
alternate, asType, divide, divide, divide, getBaseUnits, getConverterTo, getConverterToAny, getDimension, getMultFactor, getName, getSystemConverter, inverse, isCompatible, isEquivalentTo, multiply, multiply, multiply, pow, prefix, root, shift, shift, toString, transform
-
Constructor Details
-
BaseUnit
Creates a base unit having the specified symbol.- Parameters:
symbol
- the symbol of this base unit.name
- the name of this base unit.- Throws:
IllegalArgumentException
- if the specified symbol is associated to a different unit.
-
BaseUnit
Creates a base unit with name and factor- Parameters:
factor
- the factorname
- the name of this base unit.- Throws:
IllegalArgumentException
- if the specified symbol is associated to a different unit.
-
BaseUnit
Creates a base unit having the specified symbol.- Parameters:
symbol
- the symbol of this base unit.- Throws:
IllegalArgumentException
- if the specified symbol is associated to a different unit.
-
-
Method Details
-
getSymbol
-
equals
-
hashCode
-
getSystemUnit
- Specified by:
getSystemUnit
in interfaceUnit<Q extends Quantity<Q>>
- Specified by:
getSystemUnit
in classTestUnit<Q extends Quantity<Q>>
-