public enum Unit extends Enum<Unit>
Modifier and Type | Class and Description |
---|---|
static class |
Unit.Adapter |
Enum Constant and Description |
---|
CENTIMETERS |
CUBIC_CENTIMETERS |
CUBIC_METERS |
DAYS |
FEET |
GALLONS |
GRAMS |
HOURS |
INCHES |
KILOGRAMS |
KILOMETERS |
LITERS |
METERS |
MILES |
MILLILITERS |
MILLIMETERS_MERCURY |
MINUTES |
MONTHS |
OUNCES |
PINTS |
POUNDS |
QUARTS |
SECONDS |
WEEKS |
YARDS |
YEARS |
Modifier and Type | Method and Description |
---|---|
static Unit |
fromValue(String text) |
String |
getValue() |
String |
toString() |
static Unit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Unit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Unit SECONDS
public static final Unit MINUTES
public static final Unit HOURS
public static final Unit DAYS
public static final Unit WEEKS
public static final Unit MONTHS
public static final Unit YEARS
public static final Unit INCHES
public static final Unit FEET
public static final Unit YARDS
public static final Unit MILES
public static final Unit OUNCES
public static final Unit POUNDS
public static final Unit PINTS
public static final Unit QUARTS
public static final Unit GALLONS
public static final Unit CENTIMETERS
public static final Unit METERS
public static final Unit KILOMETERS
public static final Unit GRAMS
public static final Unit KILOGRAMS
public static final Unit MILLILITERS
public static final Unit CUBIC_CENTIMETERS
public static final Unit LITERS
public static final Unit CUBIC_METERS
public static final Unit MILLIMETERS_MERCURY
public static Unit[] values()
for (Unit c : Unit.values()) System.out.println(c);
public static Unit 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 getValue()
Copyright © 2022 Sage Bionetworks. All rights reserved.