public enum CarFuelType extends Enum<CarFuelType>
Modifier and Type | Method and Description |
---|---|
static CarFuelType |
forValue(String value) |
static CarFuelType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CarFuelType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CarFuelType GASOLINE
public static final CarFuelType ELECTRIC
public static final CarFuelType UNKNOWN
public static CarFuelType[] values()
for (CarFuelType c : CarFuelType.values()) System.out.println(c);
public static CarFuelType 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 static CarFuelType forValue(String value)
Copyright © 2020. All rights reserved.