public class TripSequence
- extends Object
A trip sequence is a unique key used to differentiate on trip planning
itinerary from another. Typically, we use the
BlockTripEntry as the
unique key segment. That way, if two itineraries are composed of the same
trip sequences we just keep the best one.
That said, this is not exactly perfect. There are places for interlined
routes where the block-trip changes near a departure or arrival point. Thus,
the planner will often find two itineraries:
1) Where you board before the change.
2) Where you board after the change.
Effectively, they are the same trip but they show up as unique because their
trip sequences are slightly different.
You might be tempted to use the underlying block itself as the key, but this
would cause problems where the next best itinerary is the one where the
vehicle has done a lap and is back again.
Instead, we use the underlying
BlockSequence where available, since
this gets around this issue.
public static final TripSequence EMPTY
public TripSequence(Object blockTrip)
public TripSequence extend(Object blockTrip)
public int hashCode()
hashCode in class
public boolean equals(Object obj)
equals in class
Copyright © 2011 OneBusAway. All Rights Reserved.