org.onebusaway.transit_data_federation.services.blocks
Class BlockInstance
java.lang.Object
org.onebusaway.transit_data_federation.services.blocks.BlockInstance
public class BlockInstance
- extends Object
A block instance is the combination of a BlockEntry
and a service
date for which that block is active. The "service date" is the
"midnight time" from which the StopTimeEntry
entries are relative.
Blocks are slightly more complicated than TripInstance
, because a
block can be composed of trips with different service ids, not all which are
necessarily active on a given service date.
- Author:
- bdferris
- See Also:
BlockEntry
,
LocalizedServiceId
BlockInstance
public BlockInstance(BlockConfigurationEntry block,
long serviceDate)
BlockInstance
public BlockInstance(BlockConfigurationEntry block,
long serviceDate,
FrequencyEntry frequency)
getBlock
public BlockConfigurationEntry getBlock()
getServiceDate
public long getServiceDate()
- The service date that the block instance is operating. This is the
"midnight" time relative to the stop times for the trip.
- Returns:
- the service date on which the block is operating (Unix-time)
getFrequency
public FrequencyEntry getFrequency()
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2011 OneBusAway. All Rights Reserved.