org.onebusaway.transit_data_federation.services.blocks
Class BlockInstance

java.lang.Object
  extended by 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

Constructor Summary
BlockInstance(BlockConfigurationEntry block, InstanceState state)
           
BlockInstance(BlockConfigurationEntry block, long serviceDate)
           
BlockInstance(BlockConfigurationEntry block, long serviceDate, FrequencyEntry frequency)
           
 
Method Summary
 boolean equals(Object obj)
           
 BlockConfigurationEntry getBlock()
           
 long getServiceDate()
          The service date that the block instance is operating.
 InstanceState getState()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BlockInstance

public BlockInstance(BlockConfigurationEntry block,
                     long serviceDate)

BlockInstance

public BlockInstance(BlockConfigurationEntry block,
                     long serviceDate,
                     FrequencyEntry frequency)

BlockInstance

public BlockInstance(BlockConfigurationEntry block,
                     InstanceState state)
Method Detail

getBlock

public BlockConfigurationEntry getBlock()

getState

public InstanceState getState()

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)

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 © 2012 OneBusAway. All Rights Reserved.