Serializable
, Comparable<MetricPrefix>
, Prefix
public enum MetricPrefix extends Enum<MetricPrefix> implements Prefix
import static tech.units.indriya.unit.Units.*; // Static import.
import static javax.measure.MetricPrefix.*; // Static import.
import javax.measure.*;
import javax.measure.quantity.*;
...
Unit<Pressure> HECTOPASCAL = HECTO(PASCAL);
Unit<Length> KILOMETRE = KILO(METRE);
Enum Constant | Description |
---|---|
ATTO |
Prefix for 10-18.
|
CENTI |
Prefix for 10-2.
|
DECI |
Prefix for 10-1.
|
DEKA |
Prefix for 101.
|
EXA |
Prefix for 1018.
|
FEMTO |
Prefix for 10-15.
|
GIGA |
Prefix for 109.
|
HECTO |
Prefix for 102.
|
KILO |
Prefix for 103.
|
MEGA |
Prefix for 106.
|
MICRO |
Prefix for 10-6.
|
MILLI |
Prefix for 10-3.
|
NANO |
Prefix for 10-9.
|
PETA |
Prefix for 1015.
|
PICO |
Prefix for 10-12.
|
TERA |
Prefix for 1012.
|
YOCTO |
Prefix for 10-24.
|
YOTTA |
Prefix for 1024.
|
ZEPTO |
Prefix for 10-21.
|
ZETTA |
Prefix for 1021.
|
Modifier and Type | Method | Description |
---|---|---|
static <Q extends Quantity<Q>> |
ATTO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-18 |
static <Q extends Quantity<Q>> |
CENTI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-2 |
static <Q extends Quantity<Q>> |
DECI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-1 |
static <Q extends Quantity<Q>> |
DEKA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
101 |
static <Q extends Quantity<Q>> |
EXA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1018 |
static <Q extends Quantity<Q>> |
FEMTO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-15 |
int |
getExponent() |
Exponent part of the associated factor in
base^exponent representation. |
String |
getName() |
Returns the name of this prefix.
|
String |
getSymbol() |
Returns the symbol of this prefix.
|
Integer |
getValue() |
Base part of the associated factor in
base^exponent representation. |
static <Q extends Quantity<Q>> |
GIGA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
109 |
static <Q extends Quantity<Q>> |
HECTO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
102 |
static <Q extends Quantity<Q>> |
KILO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
103 |
static <Q extends Quantity<Q>> |
MEGA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
106 |
static <Q extends Quantity<Q>> |
MICRO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-6 |
static <Q extends Quantity<Q>> |
MILLI(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-3 |
static <Q extends Quantity<Q>> |
NANO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-9 |
static <Q extends Quantity<Q>> |
PETA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1015 |
static <Q extends Quantity<Q>> |
PICO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-12 |
static <Q extends Quantity<Q>> |
TERA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1012 |
static MetricPrefix |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static MetricPrefix[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static <Q extends Quantity<Q>> |
YOCTO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-24 |
static <Q extends Quantity<Q>> |
YOTTA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1024 |
static <Q extends Quantity<Q>> |
ZEPTO(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
10-21 |
static <Q extends Quantity<Q>> |
ZETTA(Unit<Q> unit) |
Returns the specified unit multiplied by the factor
1021 |
public static final MetricPrefix YOTTA
public static final MetricPrefix ZETTA
public static final MetricPrefix EXA
public static final MetricPrefix PETA
public static final MetricPrefix TERA
public static final MetricPrefix GIGA
public static final MetricPrefix MEGA
public static final MetricPrefix KILO
public static final MetricPrefix HECTO
public static final MetricPrefix DEKA
public static final MetricPrefix DECI
public static final MetricPrefix CENTI
public static final MetricPrefix MILLI
public static final MetricPrefix MICRO
public static final MetricPrefix NANO
public static final MetricPrefix PICO
public static final MetricPrefix FEMTO
public static final MetricPrefix ATTO
public static final MetricPrefix ZEPTO
public static final MetricPrefix YOCTO
public static MetricPrefix[] values()
for (MetricPrefix c : MetricPrefix.values()) System.out.println(c);
public static MetricPrefix valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static <Q extends Quantity<Q>> Unit<Q> YOTTA(Unit<Q> unit)
1024
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e24)
.public static <Q extends Quantity<Q>> Unit<Q> ZETTA(Unit<Q> unit)
1021
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e21)
.public static <Q extends Quantity<Q>> Unit<Q> EXA(Unit<Q> unit)
1018
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e18)
.public static <Q extends Quantity<Q>> Unit<Q> PETA(Unit<Q> unit)
1015
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e15)
.public static <Q extends Quantity<Q>> Unit<Q> TERA(Unit<Q> unit)
1012
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e12)
.public static <Q extends Quantity<Q>> Unit<Q> GIGA(Unit<Q> unit)
109
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e9)
.public static <Q extends Quantity<Q>> Unit<Q> MEGA(Unit<Q> unit)
106
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e6)
.public static <Q extends Quantity<Q>> Unit<Q> KILO(Unit<Q> unit)
103
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e3)
.public static <Q extends Quantity<Q>> Unit<Q> HECTO(Unit<Q> unit)
102
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e2)
.public static <Q extends Quantity<Q>> Unit<Q> DEKA(Unit<Q> unit)
101
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e1)
.public static <Q extends Quantity<Q>> Unit<Q> DECI(Unit<Q> unit)
10-1
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e-1)
.public static <Q extends Quantity<Q>> Unit<Q> CENTI(Unit<Q> unit)
10-2
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e-2)
.public static <Q extends Quantity<Q>> Unit<Q> MILLI(Unit<Q> unit)
10-3
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e-3)
.public static <Q extends Quantity<Q>> Unit<Q> MICRO(Unit<Q> unit)
10-6
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e-6)
.public static <Q extends Quantity<Q>> Unit<Q> NANO(Unit<Q> unit)
10-9
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e-9)
.public static <Q extends Quantity<Q>> Unit<Q> PICO(Unit<Q> unit)
10-12
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e-12)
.public static <Q extends Quantity<Q>> Unit<Q> FEMTO(Unit<Q> unit)
10-15
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e-15)
.public static <Q extends Quantity<Q>> Unit<Q> ATTO(Unit<Q> unit)
10-18
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e-18)
.public static <Q extends Quantity<Q>> Unit<Q> ZEPTO(Unit<Q> unit)
10-21
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e-21)
.public static <Q extends Quantity<Q>> Unit<Q> YOCTO(Unit<Q> unit)
10-24
Q
- type of the quantity measured by the unit.unit
- any unit.unit.times(1e-24)
.public Integer getValue()
base^exponent
representation. For metric prefix, this is always 10.public int getExponent()
base^exponent
representation.getExponent
in interface Prefix
Copyright © 2014–2019 Jean-Marie Dautelle, Werner Keil, Otavio Santana. All rights reserved.