public enum VoltageUnit extends java.lang.Enum<VoltageUnit>
Enum Constant and Description |
---|
MILLIVOLTS |
VOLTS |
Modifier and Type | Method and Description |
---|---|
double |
convert(double value,
VoltageUnit unit) |
double |
toMilliVolts(double value) |
double |
toVolts(double value) |
static VoltageUnit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static VoltageUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final VoltageUnit VOLTS
public static final VoltageUnit MILLIVOLTS
public static VoltageUnit[] values()
for (VoltageUnit c : VoltageUnit.values()) System.out.println(c);
public static VoltageUnit valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic double toVolts(double value)
public double toMilliVolts(double value)
public double convert(double value, VoltageUnit unit)