geofasc.swing.demo
public static enum TrafficLight.TrafficLightState extends Enum<TrafficLight.TrafficLightState>
Enum Constant and Description |
---|
GREEN |
RED |
RED_YELLOW |
YELLOW |
Modifier and Type | Method and Description |
---|---|
static TrafficLight.TrafficLightState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TrafficLight.TrafficLightState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TrafficLight.TrafficLightState RED
public static final TrafficLight.TrafficLightState YELLOW
public static final TrafficLight.TrafficLightState GREEN
public static final TrafficLight.TrafficLightState RED_YELLOW
public static TrafficLight.TrafficLightState[] values()
for (TrafficLight.TrafficLightState c : TrafficLight.TrafficLightState.values()) System.out.println(c);
public static TrafficLight.TrafficLightState 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 null