Enum DefaultDistraction
java.lang.Object
java.lang.Enum<DefaultDistraction>
org.opentrafficsim.road.gtu.lane.perception.mental.sdm.DefaultDistraction
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<DefaultDistraction>,java.lang.constant.Constable
public enum DefaultDistraction extends java.lang.Enum<DefaultDistraction>
Set of default distractions as derived by the research of Manuel Lindorfer. These only describe the statistics. Actual
Distractions are linked to the simulation. DistractionFactory can be used to create those.
Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 29 jun. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description ADULT_DISTRACTINGAdult distracting.ANSWERING_CELL_PHONEAnswering cell phone.BABY_DISTRACTINGBaby distracting.CHILD_DISTRACTINGChild distracting.CONVERSINGConversing.DIALING_CELL_PHONEDialing cell phone.DRINKINGDrinking.EXTERNAL_DISTRACTIONExternal distraction.GROOMINGGrooming.INTERNAL_DISTRACTIONInternal distraction.MANIPULATING_AUDIO_CONTROLSManipulating audio controls.MANIPULATING_VEHICLE_CONTROLSManipulating vehicle controls.PREPARING_EAT_DRINKPreparing to eat / drink.REACHINGReaching.READING_WRITINGReading or writing.SMOKINGSmoking.TALKING_CELL_PHONETalking on cell phone. -
Method Summary
Modifier and Type Method Description DurationgetAverageDuration()Returns the average duration.java.lang.StringgetDescription()Returns the description.doublegetExposure()Returns the exposure.FrequencygetFrequency()Returns the frequency per exposed driver.static DefaultDistractiongetFromId(java.lang.String id)Returns a default distraction from the id.java.lang.StringgetId()Returns the id.DurationgetStdDuration()Returns the standard deviation of duration.static DefaultDistractionvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static DefaultDistraction[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
TALKING_CELL_PHONE
Talking on cell phone. -
ANSWERING_CELL_PHONE
Answering cell phone. -
DIALING_CELL_PHONE
Dialing cell phone. -
DRINKING
Drinking. -
MANIPULATING_AUDIO_CONTROLS
Manipulating audio controls. -
SMOKING
Smoking. -
READING_WRITING
Reading or writing. -
GROOMING
Grooming. -
BABY_DISTRACTING
Baby distracting. -
CHILD_DISTRACTING
Child distracting. -
ADULT_DISTRACTING
Adult distracting. -
CONVERSING
Conversing. -
REACHING
Reaching. -
MANIPULATING_VEHICLE_CONTROLS
Manipulating vehicle controls. -
INTERNAL_DISTRACTION
Internal distraction. -
EXTERNAL_DISTRACTION
External distraction. -
PREPARING_EAT_DRINK
Preparing to eat / drink.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getId
public java.lang.String getId()Returns the id.- Returns:
- String; id
-
getDescription
public java.lang.String getDescription()Returns the description.- Returns:
- String; description
-
getFrequency
Returns the frequency per exposed driver.- Returns:
- Frequency; frequency per exposed driver
-
getExposure
public double getExposure()Returns the exposure.- Returns:
- double; exposure
-
getAverageDuration
Returns the average duration.- Returns:
- Duration; average duration
-
getStdDuration
Returns the standard deviation of duration.- Returns:
- Duration; standard deviation of duration
-
getFromId
Returns a default distraction from the id.- Parameters:
id- String; id- Returns:
- DefaultDistraction; default distraction from id
-