public static enum TrafficLight.State extends Enum<TrafficLight.State>
TrafficLight
and a TrafficMessageReceiver
.Modifier and Type | Method and Description |
---|---|
static TrafficLight.State |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TrafficLight.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TrafficLight.State red
public static final TrafficLight.State yellow
public static final TrafficLight.State green
public static final TrafficLight.State all
public static TrafficLight.State[] values()
for (TrafficLight.State c : TrafficLight.State.values()) System.out.println(c);
public static TrafficLight.State 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 nullsee also the complete user documentation .