public enum MetricPrefix extends Enum<MetricPrefix> implements tec.uom.lib.common.function.SymbolSupplier, tec.uom.lib.common.function.UnitConverterSupplier
This class provides support for the 20 prefixes used in the metric system (decimal multiples and submultiples of units). For example:
import static tec.uom.se.unit.Units.*; // Static import.
import static tec.uom.se.unit.MetricPrefix.*; // Static import.
import javax.measure.*;
import javax.measure.quantity.*;
...
Unit HECTOPASCAL = HECTO(PASCAL);
Unit KILOMETRE = KILO(METRE);
Enum Constant and Description |
---|
ATTO |
CENTI |
DECI |
DEKA |
EXA |
FEMTO |
GIGA |
HECTO |
KILO |
MEGA |
MICRO |
MILLI |
NANO |
PETA |
PICO |
TERA |
YOCTO |
YOTTA |
ZEPTO |
ZETTA |
Modifier and Type | Method and Description |
---|---|
static <Q extends javax.measure.Quantity<Q>> |
ATTO(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
10-18 |
static <Q extends javax.measure.Quantity<Q>> |
CENTI(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
10-2 |
static <Q extends javax.measure.Quantity<Q>> |
DECI(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
10-1 |
static <Q extends javax.measure.Quantity<Q>> |
DEKA(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
101 |
static <Q extends javax.measure.Quantity<Q>> |
EXA(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
1018 |
static <Q extends javax.measure.Quantity<Q>> |
FEMTO(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
10-15 |
javax.measure.UnitConverter |
getConverter()
Returns the corresponding unit converter.
|
String |
getSymbol()
Returns the symbol of this prefix.
|
static <Q extends javax.measure.Quantity<Q>> |
GIGA(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
109 |
static <Q extends javax.measure.Quantity<Q>> |
HECTO(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
102 |
static <Q extends javax.measure.Quantity<Q>> |
KILO(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
103 |
static <Q extends javax.measure.Quantity<Q>> |
MEGA(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
106 |
static <Q extends javax.measure.Quantity<Q>> |
MICRO(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
10-6 |
static <Q extends javax.measure.Quantity<Q>> |
MILLI(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
10-3 |
static <Q extends javax.measure.Quantity<Q>> |
NANO(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
10-9 |
static <Q extends javax.measure.Quantity<Q>> |
PETA(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
1015 |
static <Q extends javax.measure.Quantity<Q>> |
PICO(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
10-12 |
static <Q extends javax.measure.Quantity<Q>> |
TERA(javax.measure.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 javax.measure.Quantity<Q>> |
YOCTO(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
10-24 |
static <Q extends javax.measure.Quantity<Q>> |
YOTTA(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
1024 |
static <Q extends javax.measure.Quantity<Q>> |
ZEPTO(javax.measure.Unit<Q> unit)
Returns the specified unit multiplied by the factor
10-21 |
static <Q extends javax.measure.Quantity<Q>> |
ZETTA(javax.measure.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 String getSymbol()
getSymbol
in interface tec.uom.lib.common.function.SymbolSupplier
null
.public javax.measure.UnitConverter getConverter()
getConverter
in interface tec.uom.lib.common.function.UnitConverterSupplier
public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> YOTTA(javax.measure.Unit<Q> unit)
1024
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e24)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> ZETTA(javax.measure.Unit<Q> unit)
1021
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e21)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> EXA(javax.measure.Unit<Q> unit)
1018
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e18)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> PETA(javax.measure.Unit<Q> unit)
1015
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e15)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> TERA(javax.measure.Unit<Q> unit)
1012
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e12)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> GIGA(javax.measure.Unit<Q> unit)
109
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e9)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> MEGA(javax.measure.Unit<Q> unit)
106
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e6)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> KILO(javax.measure.Unit<Q> unit)
103
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e3)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> HECTO(javax.measure.Unit<Q> unit)
102
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e2)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> DEKA(javax.measure.Unit<Q> unit)
101
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e1)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> DECI(javax.measure.Unit<Q> unit)
10-1
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e-1)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> CENTI(javax.measure.Unit<Q> unit)
10-2
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e-2)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> MILLI(javax.measure.Unit<Q> unit)
10-3
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e-3)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> MICRO(javax.measure.Unit<Q> unit)
10-6
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e-6)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> NANO(javax.measure.Unit<Q> unit)
10-9
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e-9)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> PICO(javax.measure.Unit<Q> unit)
10-12
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e-12)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> FEMTO(javax.measure.Unit<Q> unit)
10-15
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e-15)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> ATTO(javax.measure.Unit<Q> unit)
10-18
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e-18)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> ZEPTO(javax.measure.Unit<Q> unit)
10-21
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e-21)
.public static <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> YOCTO(javax.measure.Unit<Q> unit)
10-24
Q
- The type of the quantity measured by the unit.unit
- any unit.unit.times(1e-24)
.Copyright © 2005-2017 Units of Measurement project. All Rights Reserved.