Enum CarType
- java.lang.Object
-
- java.lang.Enum<CarType>
-
- org.drools.examples.carinsurance.domain.CarType
-
- All Implemented Interfaces:
Serializable,Comparable<CarType>
public enum CarType extends Enum<CarType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LARGEHigh risk for theft, low risk for injuries inside, high risk for injuries outside.LUXURYHigh risk for repair costs.MEDIUMNormal riskMUSCLEHigh risk for everythingSMALLLow risk for theft, high risk for injuries inside.SPORTHigh risk for everything
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CarTypevalueOf(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.
-
-
-
Enum Constant Detail
-
SMALL
public static final CarType SMALL
Low risk for theft, high risk for injuries inside.
-
MEDIUM
public static final CarType MEDIUM
Normal risk
-
LARGE
public static final CarType LARGE
High risk for theft, low risk for injuries inside, high risk for injuries outside.
-
SPORT
public static final CarType SPORT
High risk for everything
-
MUSCLE
public static final CarType MUSCLE
High risk for everything
-
LUXURY
public static final CarType LUXURY
High risk for repair costs.
-
-
Method Detail
-
values
public static CarType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CarType c : CarType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CarType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-