public final class PointUpdate extends Object implements Update
IPoint.
for a particular point, you can: exclude the point, set the speed of the point or
change (increase or decrease) the speed of the point by a value or percentage.| Modifier and Type | Method and Description |
|---|---|
static PointUpdate |
buildPointExclude(IPoint point,
boolean exclude)
This method can be used to create a point update which exclude the specified point
from the route calculation.
|
static PointUpdate |
buildPointSpeedAdjustment(IPoint point,
Velocity speedAdjustment)
This is a speed update where you define a change in the speed of the point by specifying
the change in
Velocity. |
static PointUpdate |
buildPointSpeedPercentageUpdate(IPoint point,
int percentage)
This method can be used to create a point speed update where you define an increase
in the speed of the point by specifying a percentage to increase(positive value) or
decrease(negative value) the speed.
|
static PointUpdate |
buildPointSpeedUpdate(IPoint point,
Velocity speed)
This method can be used to create a point speed update where you can update speed
of the point by specifying a
Velocity |
int |
getPercentage()
Return the speed percentage set for update.
|
IPoint |
getPoint()
Returns the point for which the update was created.
|
Velocity |
getSpeed()
Return the speed set for update.
|
Velocity |
getSpeedAdjustment()
Return the speed adjustment set for update.
|
boolean |
isExclude()
Check if the point is excluded.
|
public static PointUpdate buildPointExclude(IPoint point, boolean exclude) throws RoutingException
point - IPointexclude - Boolean true or falseRoutingExceptionpublic static PointUpdate buildPointSpeedPercentageUpdate(IPoint point, int percentage) throws RoutingException
point - IPointpercentage - integer value must be less than 100, greater than -100 and !=0RoutingExceptionpublic static PointUpdate buildPointSpeedUpdate(IPoint point, Velocity speed) throws RoutingException
Velocitypoint - IPointspeed - Velocity speed must be greater than 0RoutingExceptionpublic static PointUpdate buildPointSpeedAdjustment(IPoint point, Velocity speedAdjustment) throws RoutingException
Velocity. Speed values can be increased(positive value) or
decreases(negative value). The speed adjustment should not result in a negative speed value.point - IPointspeedAdjustment - Velocity speed should not be equal to 0RoutingExceptionpublic IPoint getPoint()
IPointpublic boolean isExclude()
true or falsepublic Velocity getSpeedAdjustment()
Velocitypublic int getPercentage()
percentage value.