Package org.planit.od.odroute
Class ODRouteIterator
- java.lang.Object
-
- org.planit.od.ODDataIteratorImpl<Route>
-
- org.planit.od.odroute.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
-
-
Field Summary
-
Fields inherited from class org.planit.od.ODDataIteratorImpl
currentLocation, destinationId, originId, zones
-
-
Constructor Summary
Constructors Constructor Description ODRouteIterator(Route[][] matrixContents, Zoning.Zones zones)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Route
getCurrentValue()
Returns the path in the current cellRoute
next()
Returns the path in the next cell and increments the current position-
Methods inherited from class org.planit.od.ODDataIteratorImpl
getCurrentDestination, getCurrentOrigin, hasNext, updateCurrentLocation
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Constructor Detail
-
ODRouteIterator
public ODRouteIterator(Route[][] matrixContents, Zoning.Zones zones)
Constructor- Parameters:
matrixContents
- matrix of Path objects for each origin-destination cellzones
- the zones in the current zoning
-
-