Android 12 Developer Preview is here! Try it out, and give us your feedback!

Trip

public final class Trip
extends Object

java.lang.Object
   ↳ androidx.car.app.navigation.model.Trip


Represents information about a trip including destinations, steps, and travel estimates.

This information data may be displayed in different places in the car such as the instrument cluster screens and heads-up display.

Summary

Nested classes

class Trip.Builder

A builder of Trip

Public methods

boolean equals(Object other)
CarText getCurrentRoad()

Returns the text that describes the current road.

List<TravelEstimate> getDestinationTravelEstimates()

Returns the list of TravelEstimates for the Destinations in the trip.

List<Destination> getDestinations()

Returns the list of destinations for this trip.

List<TravelEstimate> getStepTravelEstimates()

Returns the list of TravelEstimates for the Steps in the trip.

List<Step> getSteps()

Returns the list of steps for the trip.

int hashCode()
boolean isLoading()

Returns whether the trip is in a loading state.

String toString()

Inherited methods

Public methods

equals

public boolean equals (Object other)

Parameters
other Object

Returns
boolean

getCurrentRoad

public CarText getCurrentRoad ()

Returns the text that describes the current road.

Returns
CarText

getDestinationTravelEstimates

public List<TravelEstimate> getDestinationTravelEstimates ()

Returns the list of TravelEstimates for the Destinations in the trip.

Returns
List<TravelEstimate>

getDestinations

public List<Destination> getDestinations ()

Returns the list of destinations for this trip.

Returns
List<Destination>

getStepTravelEstimates

public List<TravelEstimate> getStepTravelEstimates ()

Returns the list of TravelEstimates for the Steps in the trip.

Returns
List<TravelEstimate>

getSteps

public List<Step> getSteps ()

Returns the list of steps for the trip.

Returns
List<Step>

hashCode

public int hashCode ()

Returns
int

isLoading

public boolean isLoading ()

Returns whether the trip is in a loading state.

Returns
boolean

toString

public String toString ()

Returns
String