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

DestinationController

public class DestinationController
extends Object

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


A controller that allows testing of a Destination.

This controller allows retrieving the following fields:

Summary

Public methods

Destination get()

Retrieves the Destination that this controller is controlling.

String getAddress()

Retrieves the address that was set in the Destination being controlled via Destination.Builder.setAddress(CharSequence).

String getName()

Retrieves the name that was set in the Destination being controlled via Destination.Builder.setName(CharSequence) or Place.builder(LatLng).

static DestinationController of(Destination destination)

Creates a DestinationController to control a Destination for testing.

Inherited methods

Public methods

get

public Destination get ()

Retrieves the Destination that this controller is controlling.

Returns
Destination

getAddress

public String getAddress ()

Retrieves the address that was set in the Destination being controlled via Destination.Builder.setAddress(CharSequence).

The value returned is the CharSequence.toString() for the address provided.

Returns
String

getName

public String getName ()

Retrieves the name that was set in the Destination being controlled via Destination.Builder.setName(CharSequence) or Place.builder(LatLng).

The value returned is the CharSequence.toString() for the name provided.

Returns
String

of

public static DestinationController of (Destination destination)

Creates a DestinationController to control a Destination for testing.

Parameters
destination Destination

Returns
DestinationController