org.simantics.databoard.units.internal.deprecated
Enum Magnitude
java.lang.Object
java.lang.Enum<Magnitude>
org.simantics.databoard.units.internal.deprecated.Magnitude
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<Magnitude>
public enum Magnitude
- extends java.lang.Enum<Magnitude>
Method Summary |
int |
getExponent()
|
java.lang.String |
getPrefix()
|
static Magnitude |
getSuitable(double value)
Get most suitable magnitude for a value |
java.lang.String |
toString()
|
static Magnitude |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Magnitude[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
Methods inherited from class java.lang.Enum |
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
yotta
public static final Magnitude yotta
zetta
public static final Magnitude zetta
exa
public static final Magnitude exa
peta
public static final Magnitude peta
tera
public static final Magnitude tera
giga
public static final Magnitude giga
mega
public static final Magnitude mega
kilo
public static final Magnitude kilo
hecto
public static final Magnitude hecto
deca
public static final Magnitude deca
unscaled
public static final Magnitude unscaled
deci
public static final Magnitude deci
centi
public static final Magnitude centi
milli
public static final Magnitude milli
micro
public static final Magnitude micro
nano
public static final Magnitude nano
pico
public static final Magnitude pico
femto
public static final Magnitude femto
atto
public static final Magnitude atto
zepto
public static final Magnitude zepto
yocto
public static final Magnitude yocto
values
public static Magnitude[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (Magnitude c : Magnitude.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static Magnitude valueOf(java.lang.String name)
- 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:
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is null
getPrefix
public java.lang.String getPrefix()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Enum<Magnitude>
getExponent
public int getExponent()
getSuitable
public static Magnitude getSuitable(double value)
- Get most suitable magnitude for a value
- Parameters:
value
-
- Returns:
- suitable magnitude