Package com.globalmentor.si
Enum SIPrefix
- All Implemented Interfaces:
Named<String>
,Serializable
,Comparable<SIPrefix>
A prefix of the International System of Units codified by ISO 30. The prefixes appear in the order of smallest to largest factor.
- Author:
- Garret Wilson
- See Also:
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPrefix for quintillionth.Prefix for hundredth.Prefix for ten.Prefix for tenth.Prefix for quintillion.Prefix for quadrillionth.Prefix for billion.Prefix for hundred.Prefix for thousand.Prefix for million.Prefix for millionth.Prefix for thousandth.Prefix for billionth.No prefix.Prefix for quadrillion.Prefix for trillionth.Prefix for trillion.Prefix for septillionth.Prefix for septillion.Prefix for sextillionth.Prefix for sextillion. -
Method Summary
Modifier and TypeMethodDescriptionint
getName()
toString()
Returns a string representation of the prefix.static SIPrefix
Returns the enum constant of this type with the specified name.static SIPrefix[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
YOCTO
Prefix for septillionth. -
ZEPTO
Prefix for sextillionth. -
ATTO
Prefix for quintillionth. -
FEMTO
Prefix for quadrillionth. -
PICO
Prefix for trillionth. -
NANO
Prefix for billionth. -
MICRO
Prefix for millionth. -
MILLI
Prefix for thousandth. -
CENTI
Prefix for hundredth. -
DECI
Prefix for tenth. -
NONE
No prefix. -
DECA
Prefix for ten. -
HECTO
Prefix for hundred. -
KILO
Prefix for thousand. -
MEGA
Prefix for million. -
GIGA
Prefix for billion. -
TERA
Prefix for trillion. -
PETA
Prefix for quadrillion. -
EXA
Prefix for quintillion. -
ZETTA
Prefix for sextillion. -
YOTTA
Prefix for septillion.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getName
-
getSymbol
- Returns:
- The prefix symbol.
-
getFactorPower
public int getFactorPower()- Returns:
- The power of the prefix factor with 10 as the base.
-
getFactor
- Returns:
- The power of the prefix.
-
toString
Returns a string representation of the prefix. This version returns the prefix name.
-