public final class ItineraryEntry extends Object
ItineraryEntry represents a single instance of a Trip on a
user's Itinerary. These entries can be populated with any type of Trip
including:
For recurring Trips, there will be one ItineraryEntry for each instance of the
Trip during the Itinerary period.
An ItineraryEntry contains a basic set of details about the Trip, for full details
about the trip use ItineraryEntry.getTripType() and ItineraryEntry.getTrip().| Modifier and Type | Class and Description |
|---|---|
static class |
ItineraryEntry.TripType
TripType indicates the source of the ItineraryEntry. |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_TRAVEL_TIME_MIN
Default travel time (in minutes) when travel time cannot be determined.
|
| Modifier and Type | Method and Description |
|---|---|
Date |
getApproximateArrivalTime()
Gets the approximate arrival time based on the uncongested travel time.
|
List<Trip> |
getAssociatedTrips()
|
Date |
getDateTime()
The date/time of this
Trip instance (UTC). |
TripPoint |
getDestination()
Get the final destination of the
Trip. |
Integer |
getNotificationTime()
Get the time (in minutes) before the scheduled departure time to notify the user.
|
TripPoint |
getOrigin()
Get the origin of the
Trip. |
Schedule.ScheduleType |
getScheduleType()
Get the type of schedule for the
ItineraryEntry. |
Date |
getSuggestedDepartureTime()
Gets the suggested departure time based on the uncongested travel time.
|
Double |
getTravelTime()
Gets the uncongested travel time (in minutes) from the given origin to the destination.
|
Trip |
getTrip()
The
Trip this ItineraryEntry was created from. |
ItineraryEntry.TripType |
getTripType()
Get the type of
Trip which this ItineraryEntry was created
from. |
List<TripPoint> |
getWaypoints()
Get the ordered list of waypoints along the
Trip. |
boolean |
isFuelRequired()
Get the fuel status for this
ItineraryEntry. |
boolean |
isNotificationEnabled()
Indicates whether notifications are enabled for this
ItineraryEntry. |
String |
toString() |
public static final int DEFAULT_TRAVEL_TIME_MIN
public Trip getTrip()
Trip this ItineraryEntry was created from. Can be any
implementation of Trip, including:
Exact type can be determined by calling ItineraryEntry.getTripType(). The returned object may be
null if it is not available.public Integer getNotificationTime()
public Double getTravelTime()
public boolean isNotificationEnabled()
ItineraryEntry.true if notifications are enabled, false otherwisepublic Date getDateTime()
Trip instance (UTC).public Date getSuggestedDepartureTime()
ItineraryEntry.getScheduleType() is Schedule.ScheduleType.DEPARTURE,
then return the Date returned via ItineraryEntry.getDateTime().
Otherwise return the suggested departure time based on the arrival time and the uncongested travel time.
In case of ItineraryEntry.TripType.CALENDAR,
which has no travel time, the travel time will be ItineraryEntry.DEFAULT_TRAVEL_TIME_MIN.null if the the associated trip has no date time.public Date getApproximateArrivalTime()
ItineraryEntry.getScheduleType() is Schedule.ScheduleType.ARRIVAL,
then return the Date returned via ItineraryEntry.getDateTime().
Otherwise return the approximated arrival time based on the departure time plus travel time.
In case of ItineraryEntry.TripType.CALENDAR,
which has no travel time, the travel time will be ItineraryEntry.DEFAULT_TRAVEL_TIME_MIN.null if the the associated trip has no date time.public Schedule.ScheduleType getScheduleType()
ItineraryEntry.Schedule.ScheduleTypepublic TripPoint getOrigin()
Trip.Trip, or null if not availablepublic TripPoint getDestination()
Trip.Trippublic List<TripPoint> getWaypoints()
Trip.Trippublic ItineraryEntry.TripType getTripType()
Trip which this ItineraryEntry was created
from.public boolean isFuelRequired()
ItineraryEntry. If available, the fuel status indicates
whether the user should factor in time to refuel in addition to the travel time.true if additional fuel is required to complete this trip, false otherwise
or if fuel level cannot be determinedpublic List<Trip> getAssociatedTrips()
List of Trips which are associated with this ItineraryEntry.
This is usually an indication that there are multiple trips for the same origin, destination,
time and can be used to determine what the user's preferred route for a specific ItineraryItem
is.List of associated TripsCopyright © 2013-2016 INRIX, Inc. All Rights Reserved.