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.BuilderA builder of |
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 |
@Nullable Distance |
Returns the remaining |
@Nullable CarColor |
Returns the color of the remaining distance text or |
@Nullable CarColor |
Returns the color of the remaining time text or |
long |
Returns the remaining time until arriving at the destination, in seconds. |
@Nullable CarIcon |
@RequiresCarApi(value = 5)Returns the trip icon or |
@Nullable CarText |
@RequiresCarApi(value = 5)Returns the trip text or |
int |
hashCode() |
@NonNull String |
toString() |
Constants
REMAINING_TIME_UNKNOWN
public static final long REMAINING_TIME_UNKNOWN = -1
A value used to represent an unknown remaining amount of time.
Public methods
getArrivalTimeAtDestination
public @Nullable DateTimeWithZone getArrivalTimeAtDestination()
Returns the arrival time until at the destination or null if not set.
| See also | |
|---|---|
Builder |
getRemainingDistance
public @Nullable Distance getRemainingDistance()
Returns the remaining Distance until arriving at the destination, or null if not set.
| See also | |
|---|---|
Builder |
getRemainingDistanceColor
public @Nullable CarColor getRemainingDistanceColor()
Returns the color of the remaining distance text or null if not set.
| See also | |
|---|---|
setRemainingDistanceColor |
getRemainingTimeColor
public @Nullable CarColor getRemainingTimeColor()
Returns the color of the remaining time text or null if not set.
| See also | |
|---|---|
setRemainingTimeColor |
getRemainingTimeSeconds
public long getRemainingTimeSeconds()
Returns the remaining time until arriving at the destination, in seconds.
| See also | |
|---|---|
setRemainingTimeSeconds |
getTripIcon
@RequiresCarApi(value = 5)
public @Nullable CarIcon getTripIcon()
Returns the trip icon or null if not set.
| See also | |
|---|---|
setTripIcon |
getTripText
@RequiresCarApi(value = 5)
public @Nullable CarText getTripText()
Returns the trip text or null if not set.
| See also | |
|---|---|
setTripText |