public final class RoadTypeUpdate extends Object implements Update
RoadType.
for a particular roadtype, you can: set the speed of the roadtype or
change (increase or decrease) the speed of the roadtype by a value or percentage.| Modifier and Type | Method and Description |
|---|---|
static RoadTypeUpdate |
buildRoadTypeSpeedAdjustment(RoadType roadType,
Velocity speedAdjustment)
|
static RoadTypeUpdate |
buildRoadTypeSpeedPercentageUpdate(RoadType roadType,
int percentage)
This method can be used to create a
RoadType speed update where you define an increase
or decrease in the speed of the roadtype by specifying a percentage, to increase(positive value) or
decrease(negative value) the speed. |
static RoadTypeUpdate |
buildRoadTypeSpeedUpdate(RoadType roadType,
Velocity speed)
|
int |
getPercentage()
Return the speed percentage set for update.
|
RoadType |
getRoadType()
Returns the roadType for which the update was created.
|
Velocity |
getSpeed()
Return the speed set for update.
|
Velocity |
getSpeedAdjustment()
Return the speed adjustment set for update.
|
public static RoadTypeUpdate buildRoadTypeSpeedPercentageUpdate(RoadType roadType, int percentage) throws RoutingException
RoadType speed update where you define an increase
or decrease in the speed of the roadtype by specifying a percentage, to increase(positive value) or
decrease(negative value) the speed.roadType - RoadTypepercentage - integer value must be less than 100, greater than -100 and !=0RoutingExceptionpublic static RoadTypeUpdate buildRoadTypeSpeedUpdate(RoadType roadType, Velocity speed) throws RoutingException
RoadType speed update where you can update speed
of the roadType by specifying a VelocityroadType - RoadTypespeed - Velocity speed must be greater than 0RoutingExceptionpublic static RoadTypeUpdate buildRoadTypeSpeedAdjustment(RoadType roadType, Velocity speedAdjustment) throws RoutingException
RoadType by specifying
the change in Velocity. Speed values can be increased(positive value) or
decreases(negative value). The speed adjustment should not result in a negative speed value.roadType - RoadTypespeedAdjustment - Velocity speed should not be equal to 0RoutingExceptionpublic RoadType getRoadType()
RoadTypepublic Velocity getSpeedAdjustment()
Velocitypublic int getPercentage()
integer percentage value.