Class SinglePath

java.lang.Object
common.animation.SinglePath
All Implemented Interfaces:
JobPath

public class SinglePath extends Object implements JobPath
Created by IntelliJ IDEA. User: orsotronIII Represents a path the job must follow during the animation. This is a utility class for job animation to obtain step by step the queue net elements the job must enter. To define circular routes, ending element of the list provided within constructor call must be adjacent (in queue net topology) to the starting element, otherwise job will leap from an element to another during the animation.
  • Constructor Details

    • SinglePath

      public SinglePath(JobContainer[] path)
      creates a new instance of JobPath and initializes it with a list of elements of the queue net this path must go through, e.g. edges and stations.
      Parameters:
      path - : array of elements of the queue net (edges and stations) the job must pass by
  • Method Details

    • getNext

      public JobContainer getNext()
      returns a reference to the next element the job must be added to.
      Specified by:
      getNext in interface JobPath
      Returns:
      the queue net element this job must be added to
    • isLast

      public boolean isLast()
      Tests whether current element is the last of the list, e.g. job has come to the end of its path. This can be useful if the job running on this path must run only once.
      Specified by:
      isLast in interface JobPath