Enum Headway.ObjectType
- java.lang.Object
-
- java.lang.Enum<Headway.ObjectType>
-
- org.opentrafficsim.road.gtu.lane.perception.headway.Headway.ObjectType
-
- All Implemented Interfaces:
Serializable
,Comparable<Headway.ObjectType>
- Enclosing interface:
- Headway
public static enum Headway.ObjectType extends Enum<Headway.ObjectType>
the object types that can be distinguished for headway.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BUSSTOP
bus stop.CONFLICT
intersection conflict.DISTANCEONLY
there is no observed object, just a distance.GTU
the observed object for headway is a GTU.OBJECT
the observed object for headway is a generic object.STOPLINE
stop line.TRAFFICLIGHT
the observed object for headway is a traffic light.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isBusStop()
boolean
isConflict()
boolean
isDistanceOnly()
boolean
isGtu()
boolean
isObject()
boolean
isStopLine()
boolean
isTrafficLight()
static Headway.ObjectType
valueOf(String name)
Returns the enum constant of this type with the specified name.static Headway.ObjectType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
GTU
public static final Headway.ObjectType GTU
the observed object for headway is a GTU.
-
TRAFFICLIGHT
public static final Headway.ObjectType TRAFFICLIGHT
the observed object for headway is a traffic light.
-
OBJECT
public static final Headway.ObjectType OBJECT
the observed object for headway is a generic object.
-
DISTANCEONLY
public static final Headway.ObjectType DISTANCEONLY
there is no observed object, just a distance.
-
CONFLICT
public static final Headway.ObjectType CONFLICT
intersection conflict.
-
STOPLINE
public static final Headway.ObjectType STOPLINE
stop line.
-
BUSSTOP
public static final Headway.ObjectType BUSSTOP
bus stop.
-
-
Method Detail
-
values
public static Headway.ObjectType[] 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 (Headway.ObjectType c : Headway.ObjectType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Headway.ObjectType 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
-
isGtu
public boolean isGtu()
- Returns:
- whether this object is a GTU or not.
-
isTrafficLight
public boolean isTrafficLight()
- Returns:
- whether this object is a GTU or not.
-
isObject
public boolean isObject()
- Returns:
- whether this object is an object or not.
-
isDistanceOnly
public boolean isDistanceOnly()
- Returns:
- whether no object was observed and only a distance was stored.
-
isConflict
public boolean isConflict()
- Returns:
- whether this object is a conflict or not.
-
isStopLine
public boolean isStopLine()
- Returns:
- whether this object is a stop line or not.
-
isBusStop
public boolean isBusStop()
- Returns:
- whether this object is a bus stop or not.
-
-