import static tech.units.indriya.unit.Units.*; // Static import (from the RI).
import static javax.measure.MetricPrefix.*; // Static import.
import javax.measure.*;
import javax.measure.quantity.*;
...
Unit<Pressure> HECTOPASCAL = HECTO(PASCAL);
Unit<Length> KILOMETRE = KILO(METRE);
You could also apply Unit.prefix:
...
Unit<Pressure> HECTOPASCAL = PASCAL.prefix(HECTO);
Unit<Length> KILOMETRE = METRE.prefix(KILO);
Do not use ordinal() to obtain the numeric representation of MetricPrefix. Use getValue() and getExponent() instead.
| Modifier and Type | Field and Description |
|---|---|
| public static final MetricPrefix | ATTO
Prefix for 10-18. |
| public static final MetricPrefix | CENTI
Prefix for 10-2. |
| public static final MetricPrefix | DECA
Prefix for 101. |
| public static final MetricPrefix | DECI
Prefix for 10-1. |
| public static final MetricPrefix | EXA
Prefix for 1018. |
| private final int | exponent
Exponent part of the associated factor in base^exponent representation. |
| public static final MetricPrefix | FEMTO
Prefix for 10-15. |
| public static final MetricPrefix | GIGA
Prefix for 109. |
| public static final MetricPrefix | HECTO
Prefix for 102. |
| public static final MetricPrefix | KILO
Prefix for 103. |
| public static final MetricPrefix | MEGA
Prefix for 106. |
| public static final MetricPrefix | MICRO
Prefix for 10-6. |
| public static final MetricPrefix | MILLI
Prefix for 10-3. |
| public static final MetricPrefix | NANO
Prefix for 10-9. |
| public static final MetricPrefix | PETA
Prefix for 1015. |
| public static final MetricPrefix | PICO
Prefix for 10-12. |
| public static final MetricPrefix | QUECTO
Prefix for 10-30. |
| public static final MetricPrefix | QUETTA
Prefix for 1030. |
| public static final MetricPrefix | RONNA
Prefix for 1027. |
| public static final MetricPrefix | RONTO
Prefix for 10-27. |
| private final String | |
| public static final MetricPrefix | TERA
Prefix for 1012. |
| public static final MetricPrefix | YOCTO
Prefix for 10-24. |
| public static final MetricPrefix | YOTTA
Prefix for 1024. |
| public static final MetricPrefix | ZEPTO
Prefix for 10-21. |
| public static final MetricPrefix | ZETTA
Prefix for 1021. |
| Access | Constructor and Description |
|---|---|
| private | MetricPrefix(String
the symbol of this prefix. symbol, int part of the associated factor in base^exponent representation. exponent)Creates a new prefix. |
| Modifier and Type | Method and Description |
|---|---|
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public int | getExponent()
Implements javax. base^exponent representation.
|
| public String | Returns: this prefix name, notnull.Implements javax. |
| public String | Returns: this prefix symbol, notnull.Implements javax. |
| public Integer | getValue()
Implements javax. base^exponent representation.
|
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static MetricPrefix | |
| public static MetricPrefix[] | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity |
| ATTO | back to summary |
|---|---|
| public static final MetricPrefix ATTO Prefix for 10-18. | |
| CENTI | back to summary |
|---|---|
| public static final MetricPrefix CENTI Prefix for 10-2.
| |
| DECA | back to summary |
|---|---|
| public static final MetricPrefix DECA Prefix for 101.
| |
| DECI | back to summary |
|---|---|
| public static final MetricPrefix DECI Prefix for 10-1.
| |
| EXA | back to summary |
|---|---|
| public static final MetricPrefix EXA Prefix for 1018. | |
| exponent | back to summary |
|---|---|
| private final int exponent Exponent part of the associated factor in base^exponent representation. | |
| FEMTO | back to summary |
|---|---|
| public static final MetricPrefix FEMTO Prefix for 10-15. | |
| GIGA | back to summary |
|---|---|
| public static final MetricPrefix GIGA Prefix for 109.
| |
| HECTO | back to summary |
|---|---|
| public static final MetricPrefix HECTO Prefix for 102.
| |
| KILO | back to summary |
|---|---|
| public static final MetricPrefix KILO Prefix for 103.
| |
| MEGA | back to summary |
|---|---|
| public static final MetricPrefix MEGA Prefix for 106.
| |
| MICRO | back to summary |
|---|---|
| public static final MetricPrefix MICRO Prefix for 10-6.
| |
| MILLI | back to summary |
|---|---|
| public static final MetricPrefix MILLI Prefix for 10-3.
| |
| NANO | back to summary |
|---|---|
| public static final MetricPrefix NANO Prefix for 10-9.
| |
| PETA | back to summary |
|---|---|
| public static final MetricPrefix PETA Prefix for 1015. | |
| PICO | back to summary |
|---|---|
| public static final MetricPrefix PICO Prefix for 10-12. | |
| QUECTO | back to summary |
|---|---|
| public static final MetricPrefix QUECTO Prefix for 10-30. | |
| QUETTA | back to summary |
|---|---|
| public static final MetricPrefix QUETTA Prefix for 1030. | |
| RONNA | back to summary |
|---|---|
| public static final MetricPrefix RONNA Prefix for 1027. | |
| RONTO | back to summary |
|---|---|
| public static final MetricPrefix RONTO Prefix for 10-27. | |
| symbol | back to summary |
|---|---|
| private final String symbol The symbol of this prefix, as returned by
| |
| TERA | back to summary |
|---|---|
| public static final MetricPrefix TERA Prefix for 1012. | |
| YOCTO | back to summary |
|---|---|
| public static final MetricPrefix YOCTO Prefix for 10-24. | |
| YOTTA | back to summary |
|---|---|
| public static final MetricPrefix YOTTA Prefix for 1024. | |
| ZEPTO | back to summary |
|---|---|
| public static final MetricPrefix ZEPTO Prefix for 10-21. | |
| ZETTA | back to summary |
|---|---|
| public static final MetricPrefix ZETTA Prefix for 1021. | |
| MetricPrefix | back to summary |
|---|---|
| private MetricPrefix(String symbol, int exponent) Creates a new prefix.
| |
| ATTO | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| CENTI | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| DECA | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| DECI | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| DEKA | back to summary |
|---|---|
| public static <Q extends Quantity US alias for | |
| EXA | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| FEMTO | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| getExponent | back to summary |
|---|---|
| public int getExponent() Implements javax. Exponent part of the associated factor in
| |
| getName | back to summary |
|---|---|
| public String getName() Implements javax. Returns the name of this prefix. | |
| getSymbol | back to summary |
|---|---|
| public String getSymbol() Implements javax. Returns the symbol of this prefix. | |
| getValue | back to summary |
|---|---|
| public Integer getValue() Implements javax. Base part of the associated factor in
| |
| GIGA | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| HECTO | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| KILO | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| MEGA | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| MICRO | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| MILLI | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| NANO | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| PETA | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| PICO | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| QUECTO | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| QUETTA | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| RONNA | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| RONTO | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| TERA | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| valueOf | back to summary |
|---|---|
| public static MetricPrefix valueOf(String name) | |
| values | back to summary |
|---|---|
| public static MetricPrefix[] values() | |
| YOCTO | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| YOTTA | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| ZEPTO | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| ZETTA | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |