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

PlaceListMapTemplateController

public class PlaceListMapTemplateController
extends Object

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


A controller that allows testing of a PlaceListMapTemplate.

This controller allows:

Summary

Public methods

PlaceListMapTemplate get()

Retrieves the PlaceListMapTemplate that this controller is controlling.

ActionStripController getActionStrip()

Returns an ActionStripController that contains the ActionStrip in the PlaceListMapTemplate that is being controlled, or null if one is not present.

PlaceController getAnchor()

Returns a PlaceController that contains the Place that is set as an anchor, or null if one is not present.

ActionController getHeaderAction()

Retrieves a ActionController for the header Action that is being controlled, or null if none is present.

ItemListController getItemList()

Returns an ItemListController that contains the ItemList in the PlaceListMapTemplate that is being controlled.

RowController getRowByTitle(String title)

Returns a RowController containing the first Row that was added with the given title as its title, in the ItemList contained in the PlaceListMapTemplate that is being controlled, or null if none match.

String getTitle()

Retrieves the title set in the PlaceListMapTemplate that is being controlled, or null if none is present.

boolean isCurrentLocationEnabled()

Returns whether the current location should be shown.

boolean isLoading()

Returns true if the template is set to be loading.

static PlaceListMapTemplateController of(PlaceListMapTemplate placeListMapTemplate)

Creates a PlaceListMapTemplateController to control an PlaceListMapTemplate for testing.

Inherited methods

Public methods

get

public PlaceListMapTemplate get ()

Retrieves the PlaceListMapTemplate that this controller is controlling.

Returns
PlaceListMapTemplate

getActionStrip

public ActionStripController getActionStrip ()

Returns an ActionStripController that contains the ActionStrip in the PlaceListMapTemplate that is being controlled, or null if one is not present.

Returns
ActionStripController

getAnchor

public PlaceController getAnchor ()

Returns a PlaceController that contains the Place that is set as an anchor, or null if one is not present.

Returns
PlaceController

getHeaderAction

public ActionController getHeaderAction ()

Retrieves a ActionController for the header Action that is being controlled, or null if none is present.

Returns
ActionController

getItemList

public ItemListController getItemList ()

Returns an ItemListController that contains the ItemList in the PlaceListMapTemplate that is being controlled.

Returns
ItemListController

getRowByTitle

public RowController getRowByTitle (String title)

Returns a RowController containing the first Row that was added with the given title as its title, in the ItemList contained in the PlaceListMapTemplate that is being controlled, or null if none match.

The value should be the CharSequence.toString() for the title originally provided.

Parameters
title String

Returns
RowController

getTitle

public String getTitle ()

Retrieves the title set in the PlaceListMapTemplate that is being controlled, or null if none is present.

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

Returns
String

isCurrentLocationEnabled

public boolean isCurrentLocationEnabled ()

Returns whether the current location should be shown.

Returns
boolean

isLoading

public boolean isLoading ()

Returns true if the template is set to be loading.

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

Returns
boolean

of

public static PlaceListMapTemplateController of (PlaceListMapTemplate placeListMapTemplate)

Creates a PlaceListMapTemplateController to control an PlaceListMapTemplate for testing.

Parameters
placeListMapTemplate PlaceListMapTemplate

Returns
PlaceListMapTemplateController