public enum VolumeUnit extends java.lang.Enum<VolumeUnit>
Enum Constant and Description |
---|
CubicCentimeters |
CubicFeet |
CubicInches |
CubicMeters |
CubicMicrons |
CubicMillimeters |
CubicMils |
FemtoLiters |
MicroLiters |
MilliLiters |
Modifier and Type | Method and Description |
---|---|
static VolumeUnit |
fromLengthUnit(LengthUnit lengthUnit)
Creates a preferred volume unit equivalent to the cube of the given length unit
|
static VolumeUnit |
fromLengthUnit(LengthUnit lengthUnit,
boolean preferredUnit)
Creates a volume unit equivalent to the cube of the given length unit
|
LengthUnit |
getLengthUnit()
Creates a length unit, that when cubed, is equivalent to this volume unit
|
java.lang.String |
getShortName() |
java.lang.String |
getSingularName() |
static VolumeUnit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static VolumeUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final VolumeUnit CubicMeters
public static final VolumeUnit CubicCentimeters
public static final VolumeUnit MilliLiters
public static final VolumeUnit CubicMillimeters
public static final VolumeUnit MicroLiters
public static final VolumeUnit CubicFeet
public static final VolumeUnit CubicInches
public static final VolumeUnit CubicMils
public static final VolumeUnit CubicMicrons
public static final VolumeUnit FemtoLiters
public static VolumeUnit[] values()
for (VolumeUnit c : VolumeUnit.values()) System.out.println(c);
public static VolumeUnit 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 java.lang.String getShortName()
public java.lang.String getSingularName()
public LengthUnit getLengthUnit()
public static VolumeUnit fromLengthUnit(LengthUnit lengthUnit)
lengthUnit
- - the given length unitpublic static VolumeUnit fromLengthUnit(LengthUnit lengthUnit, boolean preferredUnit)
lengthUnit
- - the given length unitpreferredUnit
- - flag to indicate whether the preferred or non-preferred unit
should be returned (preferred unit is returned when set to true)