org.drools.examples.carinsurance.domain
Enum CarType

java.lang.Object
  extended by java.lang.Enum<CarType>
      extended by org.drools.examples.carinsurance.domain.CarType
All Implemented Interfaces:
Serializable, Comparable<CarType>

public enum CarType
extends Enum<CarType>


Enum Constant Summary
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
 
Method Summary
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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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 name
NullPointerException - if the argument is null


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.