Class StationQueue

java.lang.Object
com.assemblyrobot.simulator.system.components.StationQueue

public class StationQueue
extends java.lang.Object
Generic station list/queue, ordered by vacancy (I.e. the simulator makes an assumption of automatically prioritising empty stations over full ones, Materials get no choice over this).
  • Constructor Summary

    Constructors
    Constructor Description
    StationQueue()  
  • Method Summary

    Modifier and Type Method Description
    void add​(Station station)
    Adds a station to the queue.
    void dump()
    Dumps all stations from the queue.
    java.util.List<Station> getAll()
    Returns a List of all Stations in this queue.
    Station peek()
    Returns the next vacant Station.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StationQueue

      public StationQueue()
  • Method Details

    • add

      public void add​(Station station)
      Adds a station to the queue.
      Parameters:
      station - Station
    • peek

      public Station peek()
      Returns the next vacant Station.
      Returns:
      First vacant Station.
    • getAll

      public java.util.List<Station> getAll()
      Returns a List of all Stations in this queue.
      Returns:
      List<Station>
    • dump

      public void dump()
      Dumps all stations from the queue. Used for resets between simulator runs.