Class ODRouteIterator

  • All Implemented Interfaces:
    Iterator<Route>, ODDataIterator<Route>

    public class ODRouteIterator
    extends ODDataIteratorImpl<Route>
    Iterator which runs through rows and columns of a matrix of Path objects, making the Path, row and column of each cell available
    Author:
    gman6028
    • Constructor Detail

      • ODRouteIterator

        public ODRouteIterator​(Route[][] matrixContents,
                               Zoning.Zones zones)
        Constructor
        Parameters:
        matrixContents - matrix of Path objects for each origin-destination cell
        zones - the zones in the current zoning
    • Method Detail

      • getCurrentValue

        public Route getCurrentValue()
        Returns the path in the current cell
        Returns:
        the Path in the current cell
      • next

        public Route next()
        Returns the path in the next cell and increments the current position
        Returns:
        the path the next cell