Class ODPathMatrix

  • All Implemented Interfaces:
    ODData<Path>

    public class ODPathMatrix
    extends ODDataImpl<Path>
    This class stores the path objects from each origin to each destination.
    Author:
    gman6028
    • Field Detail

      • id

        protected final long id
        Unique identifier
    • Constructor Detail

      • ODPathMatrix

        public ODPathMatrix​(IdGroupingToken groupId,
                            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 Path 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,
                             Path 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 ODPathIterator 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 od pathmatrix instance