java.lang.Object
com.esri.arcgisruntime.tasks.networkanalysis.Stop

public final class Stop extends Object
Represent stops - locations that must be visited along a route. Stops are part of RouteParameters which is used as an input to RouteTask.solveRouteAsync(RouteParameters). You need at least two stops to compute a route, although you can have more.
Since:
100.0.0
  • Constructor Details

    • Stop

      public Stop(Point point)
      Creates an instance of Stop.
      Parameters:
      point - geometry of the stop
      Throws:
      IllegalArgumentException - if point is null
      Since:
      100.0.0
  • Method Details

    • getName

      public String getName()
      Gets the name that was set for this Stop.
      Returns:
      the name. Default value is an empty string
      Since:
      100.0.0
    • setName

      public void setName(String name)
      Sets the name for this Stop.
      Parameters:
      name - name. Null is treated as an empty string.
      Since:
      100.0.0
    • getType

      public Stop.Type getType()
      Gets the type that was set for this stop.
      Returns:
      the stop's type. Default value is Stop.Type.STOP
      Since:
      100.1.0
    • setType

      public void setType(Stop.Type type)
      Sets the type for this stop.
      Parameters:
      type - the stop's type
      Since:
      100.1.0
    • getRouteName

      public String getRouteName()
      Gets the name of the route to which this Stop belongs.
      Returns:
      the route name. Default value is an empty string
      Since:
      100.0.0
    • setRouteName

      public void setRouteName(String routeName)
      Sets the name of the route to which this Stop belongs. You can use this to group Stops into separate routes.
      Parameters:
      routeName - route name. Null is treated as an empty string.
      Since:
      100.0.0
    • getCurbApproach

      public CurbApproach getCurbApproach()
      Gets the CurbApproach that was set.
      Returns:
      the curb approach. Default value is CurbApproach.EITHER_SIDE
      Since:
      100.0.0
    • setCurbApproach

      public void setCurbApproach(CurbApproach curbApproach)
      Sets the direction from which a vehicle may arrive at or depart from the stop. For example, a school bus must approach and depart a school from its door side so that students entering/exiting the bus will not have to cross the street.
      Parameters:
      curbApproach - curb approach
      Throws:
      IllegalArgumentException - if curbApproach is null
      Since:
      100.0.0
    • getAddedCost

      public double getAddedCost(String attributeName)
      Gets the added cost that was set for this Stop.
      Parameters:
      attributeName - attribute name. It can be empty. Null is treated as an empty string.
      Returns:
      the added cost. Returns 0 if it was not set.
      Since:
      100.0.0
    • setAddedCost

      public void setAddedCost(String attributeName, double addedCost)
      Sets the added cost for this Stop.
      Parameters:
      attributeName - attribute name. It can be empty. Null is treated as an empty string.
      addedCost - added cost
      Since:
      100.0.0
    • getNetworkLocation

      public NetworkLocation getNetworkLocation()
      Gets the Stop's location in the underlying transportation network.
      Returns:
      the network location. Returns null by default
      Since:
      100.0.0
    • setNetworkLocation

      public void setNetworkLocation(NetworkLocation networkLocation)
      Sets the Stop's location in the underlying transportation network.
      Parameters:
      networkLocation - network location. It can't be null
      Throws:
      IllegalArgumentException - if networkLocation is null
      Since:
      100.0.0
    • getDistanceToNetworkLocation

      public double getDistanceToNetworkLocation()
      Gets the distance to network location in meters.
      Returns:
      the distance to network location in meters. Returns NaN by default.
      Since:
      100.0.0
    • getCurrentBearing

      public double getCurrentBearing()
      Gets the current bearing in degrees.
      Returns:
      the current bearing in degrees. Returns Double.NaN by default
      Since:
      100.0.0
      See Also:
    • setCurrentBearing

      public void setCurrentBearing(double currentBearing)
      Sets the current bearing in degrees.

      Current bearing in degrees, measured clockwise from true north. Typical values are 0 to 360 or NaN. Negative values will be subtracted from 360 (e.g. -15 => 345). Values greater than 360 will be have 360 subtracted from them (e.g. 385 => 25). For this property to be used, the bearing tolerance also has to be set.

      Parameters:
      currentBearing - current bearing in degrees
      Since:
      100.0.0
      See Also:
    • getCurrentBearingTolerance

      public double getCurrentBearingTolerance()
      Gets the current bearing tolerance in degrees.
      Returns:
      the current bearing tolerance in degrees. Returns Double.NaN by default.
      Since:
      100.0.0
      See Also:
    • setCurrentBearingTolerance

      public void setCurrentBearingTolerance(double currentBearingTolerance)
      Sets the current bearing tolerance in degrees. Valid values are 0 to 180 or NaN.
      Parameters:
      currentBearingTolerance - current bearing tolerance in degrees
      Since:
      100.0.0
      See Also:
    • getNavigationLatency

      public double getNavigationLatency()
      Gets the navigation latency in seconds.
      Returns:
      the navigation latency in seconds. Returns Double.NaN by default
      Since:
      100.0.0
    • setNavigationLatency

      public void setNavigationLatency(double navigationLatency)
      Sets the navigation latency in seconds.
      Parameters:
      navigationLatency - navigation latency in seconds
      Since:
      100.0.0
    • getNavigationSpeed

      public double getNavigationSpeed()
      Gets the navigation speed in meters per second.
      Returns:
      the navigation speed in meters per second. Returns Double.NaN by default
      Since:
      100.0.0
    • setNavigationSpeed

      public void setNavigationSpeed(double navigationSpeed)
      Sets the navigation speed in meters per second.
      Parameters:
      navigationSpeed - navigation speed in meters per second
      Since:
      100.0.0
    • getArrivalCurbApproach

      public CurbApproach getArrivalCurbApproach()
      Gets the direction from which a vehicle arrives at this stop.
      Returns:
      the arrival curb approach. Returns CurbApproach.UNKNOWN by default
      Since:
      100.0.0
    • getDepartureCurbApproach

      public CurbApproach getDepartureCurbApproach()
      Gets the direction from which a vehicle departs from the stop.
      Returns:
      the departure curb approach. Returns CurbApproach.UNKNOWN by default
      Since:
      100.0.0
    • getCumulativeCost

      public double getCumulativeCost(String attributeName)
      Gets the cumulative cost. The valid set of attribute names can be obtained from RouteTaskInfo.getCostAttributes().
      Parameters:
      attributeName - attribute name
      Returns:
      the cumulative cost
      Since:
      100.0.0
    • getArrivalTime

      public Calendar getArrivalTime()
      Gets time of arrival at the stop.
      Returns:
      the arrival time. Returns null by default
      Since:
      100.0.0
    • getArrivalTimeShift

      public double getArrivalTimeShift()
      Time zone shift for arrival time, in minutes.
      Returns:
      time zone shift for arrival time, in minutes
      Since:
      100.0.0
    • getDepartureTime

      public Calendar getDepartureTime()
      Gets time of departure from the stop.
      Returns:
      the departure time. Returns null by default
      Since:
      100.0.0
    • getDepartureTimeShift

      public double getDepartureTimeShift()
      Time zone shift for departure time, in minutes.
      Returns:
      time zone shift for departure time, in minutes
      Since:
      100.0.0
    • getTimeWindowStart

      public Calendar getTimeWindowStart()
      Gets the time window start that was set.
      Returns:
      the time window start. Returns null if it was not set
      Since:
      100.0.0
    • setTimeWindowStart

      public void setTimeWindowStart(Calendar timeWindowStart)
      Sets the beginning time of a permissible time window for the stop. The route will attempt to visit the stop only within its time window, if possible. Can be null if you don't want to specify a time window constraint.
      Parameters:
      timeWindowStart - time window start, Allows null value
      Since:
      100.0.0
    • getTimeWindowEnd

      public Calendar getTimeWindowEnd()
      Gets the time window end that was set.
      Returns:
      the time window end. Returns null if it was not set
      Since:
      100.0.0
    • setTimeWindowEnd

      public void setTimeWindowEnd(Calendar timeWindowEnd)
      Sets ending time of a permissible time window for the stop. The route will attempt to visit the stop only within its time window, if possible. Can be null if you don't want to specify a time window constraint.
      Parameters:
      timeWindowEnd - time window end, allows null value
      Since:
      100.0.0
    • getLocationStatus

      public LocationStatus getLocationStatus()
      Gets the location status.
      Returns:
      the location status. Returns LocationStatus.NOT_LOCATED by default.
      Since:
      100.0.0
    • getGeometry

      public Point getGeometry()
      Gets the location the Stop should be placed on the map.
      Returns:
      the location of this Stop on the map
      Since:
      100.0.0
    • setGeometry

      public void setGeometry(Point location)
      Sets the location at which this Stop should be placed on the map.
      Parameters:
      location - the location at which this Stop should be placed on the map
      Throws:
      IllegalArgumentException - if location is null
      Since:
      100.4.0
    • getSequence

      public int getSequence()
      Gets the order in which stop is visited along the route. A value of 1 implies it is the first stop, and so on.
      Returns:
      the sequence. Returns 0 by default
      Since:
      100.0.0
    • getStopId

      public int getStopId()
      Gets the stop ID.

      This is a caller supplied foreign key that can be used to associate output stops with input stops.

      Returns:
      the stop ID
      Since:
      100.6.0
      See Also:
    • setStopId

      public void setStopId(int stopId)
      Sets the stop ID.

      This is a caller supplied foreign key that can be used to associate output stops with input stops.

      Parameters:
      stopId - the stop ID
      Since:
      100.6.0
      See Also:
    • getViolationTime

      public double getViolationTime()
      Gets the time (in minutes) by which the route arrives later than the permissible time window for the stop. This is the difference between getArrivalTime() and getTimeWindowEnd()
      Returns:
      the violation time. Returns 0 by default
      Since:
      100.0.0
    • getWaitTime

      public double getWaitTime()
      Gets the time (in minutes) spent at the stop waiting for the time window to open when the route arrives early This is the difference between getArrivalTime() and getTimeWindowStart()
      Returns:
      the wait time. Returns 0 by default
      Since:
      100.0.0