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:
- Retrieving the current step set via
RoutingInfo.Builder.setCurrentStep(Step, Distance)
. - Retrieving the current distance set via
RoutingInfo.Builder.setCurrentStep(Step, Distance)
. - Retrieving the next step set via
RoutingInfo.Builder.setNextStep(Step)
. - Retrieving the next distance set via
RoutingInfo.Builder.setNextStep(Step)
.
Summary
Public methods | |
---|---|
RoutingInfo
|
get()
Retrieves the |
Distance
|
getCurrentDistance()
Returns the current distance set in the |
StepController
|
getCurrentStep()
Returns a |
StepController
|
getNextStep()
Returns a |
boolean
|
isLoading()
Returns |
static
RoutingInfoController
|
of(RoutingInfo routingInfo)
Creates a |
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 |