com.sygic.sdk.route.Route Class Reference
Inheritance diagram for com.sygic.sdk.route.Route:
Collaboration diagram for com.sygic.sdk.route.Route:

Classes

interface  RoadElementsCallback
 

Public Member Functions

int getRouteId ()
 
GeoBoundingBox getBoundingBox ()
 
RouteInfo getRouteInfo ()
 
Waypoint getStart ()
 
Waypoint getDestination ()
 
List< WaypointgetWaypoints ()
 
RoutingOptions getRoutingOptions ()
 
List< RouteManeuvergetManeuvers ()
 
void getRoadElements (@NonNull RoadElementsCallback callback)
 
void getRoadElements (@NonNull RoadElementsCallback callback, @Nullable Executor executor)
 
RouteViolatedAvoidOptions getRouteViolatedAvoidOptions ()
 
String serializeToBriefJSON ()
 
String serializeToFullJSON ()
 
List< String > getTransitCountries ()
 
boolean equals (Object o)
 
int hashCode ()
 
int describeContents ()
 
void writeToParcel (final Parcel dest, final int flags)
 
- Public Member Functions inherited from com.sygic.sdk.BaseNativeParcelable
boolean isValidParcelable ()
 

Static Public Member Functions

static Route deserializeFromFullJSON (@NonNull final String json)
 

Static Public Attributes

static final Parcelable.Creator< RouteCREATOR
 

Protected Member Functions

void finalize () throws Throwable
 
 Route (final Parcel in)
 

Additional Inherited Members

- Protected Attributes inherited from com.sygic.sdk.BaseNativeParcelable
boolean mIsValidParcelable = true
 

Detailed Description

Collection of maneuvers and roadElements connecting two or more waypoints. Waypoints may be thought of as the input to a route calculation whereas maneuvers are the results of calculating a route.

Constructor & Destructor Documentation

◆ Route()

com.sygic.sdk.route.Route.Route ( final Parcel  in)
protected

Member Function Documentation

◆ describeContents()

int com.sygic.sdk.route.Route.describeContents ( )

For documentation, see android.os.Parcelable.describeContents()

◆ deserializeFromFullJSON()

static Route com.sygic.sdk.route.Route.deserializeFromFullJSON ( @NonNull final String  json)
static

Deserialize route from json generated with Route#serializeToFullJSON(). Will return null if deserialization fails.

◆ equals()

boolean com.sygic.sdk.route.Route.equals ( Object  o)

◆ finalize()

void com.sygic.sdk.route.Route.finalize ( ) throws Throwable
protected

◆ getBoundingBox()

GeoBoundingBox com.sygic.sdk.route.Route.getBoundingBox ( )

The smallest GeoBoundingBox that contains the entire route.

◆ getDestination()

Waypoint com.sygic.sdk.route.Route.getDestination ( )

Returns the destination waypoint of the route

Returns
destination waypoint

◆ getManeuvers()

List<RouteManeuver> com.sygic.sdk.route.Route.getManeuvers ( )

Returns an array of directions for current route object from start. Note: This array doesn't change while navigating.

Returns
Array of directions

◆ getRoadElements() [1/2]

void com.sygic.sdk.route.Route.getRoadElements ( @NonNull RoadElementsCallback  callback)

Returns a list of RoadElement objects for current route object from start. The elements are generated asynchronously and returned via callback. The callback will be called on main thread. Note: This array doesn't change while navigating.

◆ getRoadElements() [2/2]

void com.sygic.sdk.route.Route.getRoadElements ( @NonNull RoadElementsCallback  callback,
@Nullable Executor  executor 
)

Returns a list of RoadElement objects for current route object from start. The elements are generated asynchronously and returned via callback. The callback will be called on provided executor or on main thread if null. Note: This array doesn't change while navigating.

◆ getRouteId()

int com.sygic.sdk.route.Route.getRouteId ( )

Returns the unique id identifies the route. It is used for setting current route for navigation.

Returns
Unique id of the route

◆ getRouteInfo()

RouteInfo com.sygic.sdk.route.Route.getRouteInfo ( )

Returns basic route info.

◆ getRouteViolatedAvoidOptions()

RouteViolatedAvoidOptions com.sygic.sdk.route.Route.getRouteViolatedAvoidOptions ( )

◆ getRoutingOptions()

RoutingOptions com.sygic.sdk.route.Route.getRoutingOptions ( )

Returns options used for computing this route.

◆ getStart()

Waypoint com.sygic.sdk.route.Route.getStart ( )

Returns the starting waypoint of the route

Returns
starting waypoint

◆ getTransitCountries()

List<String> com.sygic.sdk.route.Route.getTransitCountries ( )

Returns list of countries route is passing by

Returns
List of iso codes of countries

◆ getWaypoints()

List<Waypoint> com.sygic.sdk.route.Route.getWaypoints ( )

List of Waypoints on the route including starting point and destination.

◆ hashCode()

int com.sygic.sdk.route.Route.hashCode ( )

◆ serializeToBriefJSON()

String com.sygic.sdk.route.Route.serializeToBriefJSON ( )

Serialize the route to a JSON string. Brief serialization is to be used with Router#computeRouteFromJSONString(String, Router.RouteComputeListener). Only waypoints and routing options are saved, so route has to be computed again.

◆ serializeToFullJSON()

String com.sygic.sdk.route.Route.serializeToFullJSON ( )

Serialize the route to a JSON string. Full serialization is to be used with Route#deserializeFromFullJSON(String). All of route info is saved, so no computing is needed.

◆ writeToParcel()

void com.sygic.sdk.route.Route.writeToParcel ( final Parcel  dest,
final int  flags 
)

For documentation, see android.os.Parcelable.writeToParcel().

Member Data Documentation

◆ CREATOR

final Parcelable.Creator<Route> com.sygic.sdk.route.Route.CREATOR
static
Initial value:
= new Parcelable.Creator<Route>() {
@Override
public Route createFromParcel(final Parcel source) {
return new Route(source);
}
@Override
public Route[] newArray(final int size) {
return new Route[size];
}
}

The documentation for this class was generated from the following file: