public enum TrafficLightColor extends Enum<TrafficLightColor>
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Enum Constant and Description |
|---|
BLACK
Traffic light is not working.
|
GREEN
GTU is allowed to drive.
|
RED
GTU needs to stop.
|
YELLOW
GTU is allowed to continue if it cannot stop anymore.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isBlack() |
boolean |
isGreen() |
boolean |
isRed() |
boolean |
isYellow() |
static TrafficLightColor |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TrafficLightColor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TrafficLightColor RED
public static final TrafficLightColor YELLOW
public static final TrafficLightColor GREEN
public static final TrafficLightColor BLACK
public static TrafficLightColor[] values()
for (TrafficLightColor c : TrafficLightColor.values()) System.out.println(c);
public static TrafficLightColor 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 nullpublic final boolean isRed()
public final boolean isYellow()
public final boolean isGreen()
public final boolean isBlack()
Copyright © 2014–2016 Delft University of Technology. All rights reserved.