Class TripSequence

  extended by org.onebusaway.transit_data_federation.impl.otp.TripSequence

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.


Field Summary
static TripSequence EMPTY
Constructor Summary
TripSequence(Object blockTrip)
Method Summary
 boolean equals(Object obj)
 TripSequence extend(Object blockTrip)
 int hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final TripSequence EMPTY
Constructor Detail


public TripSequence(Object blockTrip)
Method Detail


public TripSequence extend(Object blockTrip)


public int hashCode()
hashCode in class Object


public boolean equals(Object obj)
equals in class Object

Copyright © 2012 OneBusAway. All Rights Reserved.