Google is committed to advancing racial equity for Black communities. See how.

RoutingInfoController

public class RoutingInfoController
extends Object implements NavigationTemplateController.NavigationInfoController

java.lang.Object
   ↳ com.google.android.libraries.car.app.testing.navigation.model.RoutingInfoController


A controller that allows testing of a RoutingInfo.

This controller allows:

Summary

Public methods

RoutingInfo get()

Retrieves the RoutingInfo that this controller is controlling.

Distance getCurrentDistance()

Returns the current distance set in the RoutingInfoController, or null if one is not present.

StepController getCurrentStep()

Returns a StepController that contains the current step set in the NavigationTemplateController, or null if one is not present.

StepController getNextStep()

Returns a StepController that contains the next step set in the RoutingInfoController, or null if one is not present.

boolean isLoading()

Returns true if the RoutingInfo is set to be loading.

static RoutingInfoController of(RoutingInfo routingInfo)

Creates a RoutingInfoController to control an RoutingInfo for testing.

Inherited methods

Public methods

get

public RoutingInfo get ()

Retrieves the RoutingInfo that this controller is controlling.

Returns
RoutingInfo

getCurrentDistance

public Distance getCurrentDistance ()

Returns the current distance set in the RoutingInfoController, or null if one is not present.

Returns
Distance

getCurrentStep

public StepController getCurrentStep ()

Returns a StepController that contains the current step set in the NavigationTemplateController, or null if one is not present.

Returns
StepController

getNextStep

public StepController getNextStep ()

Returns a StepController that contains the next step set in the RoutingInfoController, or null if one is not present.

Returns
StepController

isLoading

public boolean isLoading ()

Returns true if the RoutingInfo is set to be loading.

This state is set via calling RoutingInfo.Builder.setIsLoading(boolean).

Returns
boolean

of

public static RoutingInfoController of (RoutingInfo routingInfo)

Creates a RoutingInfoController to control an RoutingInfo for testing.

Parameters
routingInfo RoutingInfo

Returns
RoutingInfoController