Builder for building SpeedAlertOptions.
Public Constructor Summary
Builder()
Creates an empty builder.
|
Public Method Summary
SpeedAlertOptions |
build()
Builds a
SpeedAlertOptions . |
SpeedAlertOptions.Builder |
setSeverityUpgradeDurationSeconds(double seconds)
Sets the time in seconds needed to upgrade speed alerts from
SpeedAlertSeverity.MINOR
to SpeedAlertSeverity.MAJOR . |
SpeedAlertOptions.Builder |
setSpeedAlertThresholdPercentage(SpeedAlertSeverity speedAlertSeverity, float percentageAboveLimit)
Sets the triggering threshold as a percentage for the speed alert of the specified
SpeedAlertSeverity . |
Inherited Method Summary
Public Constructors
public Builder ()
Creates an empty builder.
Public Methods
public SpeedAlertOptions build ()
Builds a SpeedAlertOptions
.
Setting the same percentage threshold for SpeedAlertSeverity.MINOR
and SpeedAlertSeverity.MAJOR
speed alerts disables the SpeedAlertSeverity.MINOR
speed
alert and will only allow SpeedAlertSeverity.MAJOR
speed alert.
Throws
IllegalArgumentException | if not all of the following conditions are satisfied:
|
---|
public SpeedAlertOptions.Builder setSeverityUpgradeDurationSeconds (double seconds)
Sets the time in seconds needed to upgrade speed alerts from SpeedAlertSeverity.MINOR
to SpeedAlertSeverity.MAJOR
.
Speeding over SpeedAlertSeverity.MINOR
percentage threshold for longer than
specified seconds triggers SpeedAlertSeverity.MAJOR
speed alert.
Parameters
seconds |
---|
public SpeedAlertOptions.Builder setSpeedAlertThresholdPercentage (SpeedAlertSeverity speedAlertSeverity, float percentageAboveLimit)
Sets the triggering threshold as a percentage for the speed alert of the specified SpeedAlertSeverity
.
You need this method to customize the speed alert triggering thresholds as a percentage
for both SpeedAlertSeverity.MINOR
and SpeedAlertSeverity.MAJOR
alerts.
Parameters
speedAlertSeverity | |
---|---|
percentageAboveLimit |