org.onebusaway.transit_data_federation.services.blocks
Class BlockStopTimeIndex

java.lang.Object
  extended by org.onebusaway.transit_data_federation.services.blocks.AbstractBlockStopTimeIndex
      extended by org.onebusaway.transit_data_federation.services.blocks.BlockStopTimeIndex
All Implemented Interfaces:
HasIndexedBlockStopTimes, HasBlockStopTimes

public class BlockStopTimeIndex
extends AbstractBlockStopTimeIndex
implements HasIndexedBlockStopTimes

Provides an index over arrivals and departures at a particular stop. Specifically, provides an ordered list over BlockStopTimeEntry entries at the stop, where each arrival and departure in the list is greater than or equal to the previous stop time in the list. All stop times also have the same ServiceIdActivation.

Author:
bdferris

Field Summary
 
Fields inherited from class org.onebusaway.transit_data_federation.services.blocks.AbstractBlockStopTimeIndex
_blockConfigs, _stopIndices
 
Constructor Summary
BlockStopTimeIndex(List<BlockConfigurationEntry> blockConfigs, int[] stopIndices, org.onebusaway.gtfs.model.calendar.ServiceInterval serviceInterval)
           
 
Method Summary
static BlockStopTimeIndex create(BlockTripIndex blockTripIndex, int blockSequence)
           
 int getArrivalTimeForIndex(int index)
          HasIndexedBlockStopTimes Interface
 int getDepartureTimeForIndex(int index)
           
 double getDistanceAlongBlockForIndex(int index)
           
 
Methods inherited from class org.onebusaway.transit_data_federation.services.blocks.AbstractBlockStopTimeIndex
computeServiceInterval, getBlockConfigs, getServiceIds, getServiceInterval, getStop, getStopTimeForIndex, getStopTimes, getTrips, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.onebusaway.transit_data_federation.services.transit_graph.HasBlockStopTimes
getStopTimes
 

Constructor Detail

BlockStopTimeIndex

public BlockStopTimeIndex(List<BlockConfigurationEntry> blockConfigs,
                          int[] stopIndices,
                          org.onebusaway.gtfs.model.calendar.ServiceInterval serviceInterval)
Method Detail

create

public static BlockStopTimeIndex create(BlockTripIndex blockTripIndex,
                                        int blockSequence)

getArrivalTimeForIndex

public int getArrivalTimeForIndex(int index)
HasIndexedBlockStopTimes Interface

Specified by:
getArrivalTimeForIndex in interface HasIndexedBlockStopTimes

getDepartureTimeForIndex

public int getDepartureTimeForIndex(int index)
Specified by:
getDepartureTimeForIndex in interface HasIndexedBlockStopTimes

getDistanceAlongBlockForIndex

public double getDistanceAlongBlockForIndex(int index)


Copyright © 2012 OneBusAway. All Rights Reserved.