org.onebusaway.transit_data_federation.impl.otp
Class TripSequence

java.lang.Object
  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.

Author:
bdferris

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

EMPTY

public static final TripSequence EMPTY
Constructor Detail

TripSequence

public TripSequence(Object blockTrip)
Method Detail

extend

public TripSequence extend(Object blockTrip)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2011 OneBusAway. All Rights Reserved.