org.onebusaway.transit_data_federation.services.blocks
Class BlockStopSequenceIndex

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

public class BlockStopSequenceIndex
extends Object
implements HasIndexedBlockStopTimes

A BlockStopSequenceIndex is a pointer into a BlockSequenceIndex for a particular stop in the sequence. Given that the underlying BlockSequenceIndex is an ordered index of BlockSequence objects where each sequence covers a list of stops, the block stop sequence index is a slice of the underlying index for just one stop. It allows for quick lookup of BlockStopTimeEntry entries at that stop for the underlying block sequences.

Author:
bdferris
See Also:
BlockSequence, BlockSequenceIndex, BlockIndexService

Constructor Summary
BlockStopSequenceIndex(BlockSequenceIndex index, int offset)
           
 
Method Summary
 int getArrivalTimeForIndex(int index)
           
 BlockSequence getBlockSequenceForIndex(int index)
           
 BlockStopTimeEntry getBlockStopTimeForIndex(int index)
           
 int getDepartureTimeForIndex(int index)
           
 BlockSequenceIndex getIndex()
           
 int getOffset()
           
 ServiceIdActivation getServiceIds()
           
 org.onebusaway.gtfs.model.calendar.ServiceInterval getServiceInterval()
           
 List<BlockStopTimeEntry> getStopTimes()
          HasIndexedBlockStopTimes Interface
 int size()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BlockStopSequenceIndex

public BlockStopSequenceIndex(BlockSequenceIndex index,
                              int offset)
Method Detail

getIndex

public BlockSequenceIndex getIndex()

getOffset

public int getOffset()

getServiceIds

public ServiceIdActivation getServiceIds()

getServiceInterval

public org.onebusaway.gtfs.model.calendar.ServiceInterval getServiceInterval()

size

public int size()

getBlockStopTimeForIndex

public BlockStopTimeEntry getBlockStopTimeForIndex(int index)

getBlockSequenceForIndex

public BlockSequence getBlockSequenceForIndex(int index)

getStopTimes

public List<BlockStopTimeEntry> getStopTimes()
HasIndexedBlockStopTimes Interface

Specified by:
getStopTimes in interface HasBlockStopTimes

getArrivalTimeForIndex

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

getDepartureTimeForIndex

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 OneBusAway. All Rights Reserved.