TravelEstimate


@CarProtocol
public final class TravelEstimate


Represents the travel estimates to a destination of a trip or for a trip segment, including the remaining time and distance to the destination.

Summary

Nested types

public final class TravelEstimate.Builder

A builder of TravelEstimate.

Constants

static final long

A value used to represent an unknown remaining amount of time.

Public methods

boolean
@Nullable DateTimeWithZone

Returns the arrival time until at the destination or null if not set.

@Nullable Distance

Returns the remaining Distance until arriving at the destination, or null if not set.

@Nullable CarColor

Returns the color of the remaining distance text or null if not set.

@Nullable CarColor

Returns the color of the remaining time text or null if not set.

long

Returns the remaining time until arriving at the destination, in seconds.

@Nullable CarIcon

Returns the trip icon or null if not set.

@Nullable CarText

Returns the trip text or null if not set.

int
@NonNull String

Constants

REMAINING_TIME_UNKNOWN

Added in 1.0.0
public static final long REMAINING_TIME_UNKNOWN = -1

A value used to represent an unknown remaining amount of time.

Public methods

equals

public boolean equals(@Nullable Object other)

getArrivalTimeAtDestination

Added in 1.0.0
public @Nullable DateTimeWithZone getArrivalTimeAtDestination()

Returns the arrival time until at the destination or null if not set.

See also
Builder

getRemainingDistance

Added in 1.0.0
public @Nullable Distance getRemainingDistance()

Returns the remaining Distance until arriving at the destination, or null if not set.

See also
Builder

getRemainingDistanceColor

Added in 1.0.0
public @Nullable CarColor getRemainingDistanceColor()

Returns the color of the remaining distance text or null if not set.

getRemainingTimeColor

Added in 1.0.0
public @Nullable CarColor getRemainingTimeColor()

Returns the color of the remaining time text or null if not set.

getRemainingTimeSeconds

Added in 1.0.0
public long getRemainingTimeSeconds()

Returns the remaining time until arriving at the destination, in seconds.

getTripIcon

Added in 1.3.0
@RequiresCarApi(value = 5)
public @Nullable CarIcon getTripIcon()

Returns the trip icon or null if not set.

See also
setTripIcon

getTripText

Added in 1.3.0
@RequiresCarApi(value = 5)
public @Nullable CarText getTripText()

Returns the trip text or null if not set.

See also
setTripText

hashCode

public int hashCode()

toString

public @NonNull String toString()