org.onebusaway.transit_data_federation.services.blocks
Class FrequencyBlockIndex
java.lang.Object
org.onebusaway.transit_data_federation.services.blocks.FrequencyBlockIndex
- All Implemented Interfaces:
- HasBlocks
public class FrequencyBlockIndex
- extends Object
- implements HasBlocks
A FrequencyBlockIndex is a collection of BlockConfigurationEntry
elements that
have the following properties in common:
1) Each BlockConfigurationEntry
refers to the same stop sequence
pattern and underlying shape of travel.
2) Each BlockConfigurationEntry
has the same set of service ids (see
BlockConfigurationEntry.getServiceIds()
3) The list of BlockConfigurationEntry
elements is sorted by arrival
time and no block ever overtakes another block.
4) The ServiceIntervalBlock
additionally captures the min and max
arrival and departure times for each block in the list, in the same sorted
order as the block list.
These assumptions allow us to do efficient searches for blocks that are
active at a particular time.
- Author:
- bdferris
- See Also:
BlockCalendarService
FrequencyBlockIndex
public FrequencyBlockIndex(List<BlockConfigurationEntry> blocks,
List<FrequencyEntry> frequencies,
FrequencyServiceIntervalBlock serviceIntervalBlock)
- See the requirements in the class documentation.
- Parameters:
blocks
- serviceIdIntervals
- serviceIntervalBlock
-
getBlocks
public List<BlockConfigurationEntry> getBlocks()
- Specified by:
getBlocks
in interface HasBlocks
getFrequencies
public List<FrequencyEntry> getFrequencies()
getServiceIds
public ServiceIdActivation getServiceIds()
- Specified by:
getServiceIds
in interface HasBlocks
getServiceIntervalBlock
public FrequencyServiceIntervalBlock getServiceIntervalBlock()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2011 OneBusAway. All Rights Reserved.