Class RouteStep

  • All Implemented Interfaces:
    android.os.Parcelable, es.situm.sdk.model.directions.graph.Edge<Point>

    public class RouteStep
    extends Object
    implements es.situm.sdk.model.directions.graph.Edge<Point>, android.os.Parcelable
    A fragment of a route, described by the initial point from and the last point to of the fragment, and some information about the step within the route.
    • Method Detail

      • getId

        public int getId()
        Position of this RouteStep in the list of steps (Route.getSteps()) of the route to which it belongs. Also works as an unique identifier of this RouteStep in the Route.
        Returns:
        -1 if this routeStep is not valid. Otherwise a valid position in the list of steps.
      • getFrom

        @NonNull
        public Point getFrom()
        Start point of this step.
        Specified by:
        getFrom in interface es.situm.sdk.model.directions.graph.Edge<Point>
        Returns:
        point in the route.
      • getTo

        @NonNull
        public Point getTo()
        End point of this step.
        Specified by:
        getTo in interface es.situm.sdk.model.directions.graph.Edge<Point>
        Returns:
        point in the route
      • getDistanceToGoal

        public double getDistanceToGoal()
        Returns distance in meters between the start point of this step (getFrom()) and the last point in the route (getTo() of the last step).
        Returns:
        meters.
      • getDistanceToFloorChange

        public Double getDistanceToFloorChange()
        Returns distance in meters between the start point of this step (getFrom()) and the first point in the route (getFrom()) of the next step which requires a floor change.
        Returns:
        meters.
      • getDistance

        @NonNull
        public Double getDistance()
        Returns distance between getFrom() and getTo() in meters.
        Specified by:
        getDistance in interface es.situm.sdk.model.directions.graph.Edge<Point>
        Returns:
        meters.
      • getWeight

        @NonNull
        public Double getWeight()
        Specified by:
        getWeight in interface es.situm.sdk.model.directions.graph.Edge<Point>
      • setWeight

        public void setWeight​(@NonNull
                              Double weight)
        Specified by:
        setWeight in interface es.situm.sdk.model.directions.graph.Edge<Point>
      • setTags

        public void setTags​(@NonNull
                            List<String> tags)
        Specified by:
        setTags in interface es.situm.sdk.model.directions.graph.Edge<Point>
      • getTags

        @NonNull
        public List<String> getTags()
        Specified by:
        getTags in interface es.situm.sdk.model.directions.graph.Edge<Point>
      • isAccessible

        public boolean isAccessible()
        Specified by:
        isAccessible in interface es.situm.sdk.model.directions.graph.Edge<Point>
      • isFirst

        public boolean isFirst()
        Returns true if this is the first step in the route. False otherwise.
        Returns:
        boolean
      • isLast

        public boolean isLast()
        Returns true if this is the last step in the route. False otherwise.
        Returns:
        boolean
      • hasFloorChange

        public boolean hasFloorChange()
        Returns true if the floor changes in this step. False otherwise
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • lookupKey

        public String lookupKey()
      • describeContents

        public int describeContents()
        Specified by:
        describeContents in interface android.os.Parcelable
      • writeToParcel

        public void writeToParcel​(android.os.Parcel dest,
                                  int flags)
        Specified by:
        writeToParcel in interface android.os.Parcelable