Trip

@CarProtocol
public final class 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, heads-up display and floating navigation bar.

Floating navigation bar can show current navigating info in three templates including MapTemplate, RoutePreviewNavigationTemplate and PlaceListNavigationTemplate. The navigating steps can be added with the use of addStep. There are three navigation info showing in the floating nav bar including:

Summary

Nested types

public final class Trip.Builder

A builder of Trip.

Public methods

boolean
@Nullable CarText

Returns the text that describes the current road.

@NonNull List<TravelEstimate>

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

@NonNull List<Destination>

Returns the list of destinations for this trip.

@NonNull List<TravelEstimate>

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

@NonNull List<Step>

Returns the list of steps for the trip.

int
boolean

Returns whether the trip is in a loading state.

@NonNull String

Public methods

equals

Added in 1.4.0-rc02
public boolean equals(@Nullable Object other)

getCurrentRoad

Added in 1.0.0
public @Nullable CarText getCurrentRoad()

Returns the text that describes the current road.

See also
setCurrentRoad

getDestinationTravelEstimates

Added in 1.0.0
public @NonNull List<TravelEstimategetDestinationTravelEstimates()

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

See also
addDestination

getDestinations

Added in 1.0.0
public @NonNull List<DestinationgetDestinations()

Returns the list of destinations for this trip.

See also
addDestination

getStepTravelEstimates

Added in 1.0.0
public @NonNull List<TravelEstimategetStepTravelEstimates()

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

See also
addDestination

getSteps

Added in 1.0.0
public @NonNull List<StepgetSteps()

Returns the list of steps for the trip.

See also
addStep

hashCode

Added in 1.4.0-rc02
public int hashCode()

isLoading

Added in 1.0.0
public boolean isLoading()

Returns whether the trip is in a loading state.

See also
setLoading

toString

Added in 1.4.0-rc02
public @NonNull String toString()