public enum CarType extends Enum<CarType>
Enum Constant and Description |
---|
LARGE
High risk for theft, low risk for injuries inside, high risk for injuries outside.
|
LUXURY
High risk for repair costs.
|
MEDIUM
Normal risk
|
MUSCLE
High risk for everything
|
SMALL
Low risk for theft, high risk for injuries inside.
|
SPORT
High risk for everything
|
Modifier and Type | Method and Description |
---|---|
static CarType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CarType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CarType SMALL
public static final CarType MEDIUM
public static final CarType LARGE
public static final CarType SPORT
public static final CarType MUSCLE
public static final CarType LUXURY
public static CarType[] values()
for (CarType c : CarType.values()) System.out.println(c);
public static CarType 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 nullCopyright © 2001–2020 JBoss by Red Hat. All rights reserved.