Class ODRouteMatrix

  • All Implemented Interfaces:
    ODData<Route>

    public class ODRouteMatrix
    extends ODDataImpl<Route>
    This class stores the route objects from each origin to each destination.
    Author:
    gman6028
    • Field Detail

      • id

        protected final long id
        Unique identifier
    • Constructor Detail

      • ODRouteMatrix

        public ODRouteMatrix​(IdGroupingToken groupId,
                             Zoning.Zones zones)
        Constructor
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        zones - the zones being used
    • Method Detail

      • getValue

        public Route getValue​(Zone origin,
                              Zone destination)
        Returns the path for a specified origin and destination
        Parameters:
        origin - the specified origin zone
        destination - the specified destination zone
        Returns:
        the path from the origin to the destination
      • setValue

        public void setValue​(Zone origin,
                             Zone destination,
                             Route path)
        Set the path from a specified origin to a specified destination
        Parameters:
        origin - the specified origin zone
        destination - the specified destination zone
        path - the Path object from the origin to the destination
      • iterator

        public ODRouteIterator iterator()
        Returns an iterator which can iterate through all the origin-destination cells in the matrix
        Returns:
        iterator through all the origin-destination cells
      • getId

        public long getId()
        Returns:
        unique identifier of this route od route matrix instance