org.onebusaway.transit_data_federation.services.blocks
Class BlockStopSequenceIndex
java.lang.Object
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
BlockStopSequenceIndex
public BlockStopSequenceIndex(BlockSequenceIndex index,
int offset)
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 © 2012 OneBusAway. All Rights Reserved.