FutureQueue (cloudsim 3.1-SNAPSHOT API)

org.cloudbus.cloudsim.core

## Class FutureQueue

- java.lang.Object
- - org.cloudbus.cloudsim.core.FutureQueue

-     public class FutureQueue
      extends Object

  This class implements the future event queue used by `Simulation`. The event queue uses a `TreeSet` in order to store the events.
  Since:
    CloudSim Toolkit 1.0
  Author:
    Marcos Dias de Assuncao
  See Also:
    `Simulation`, `TreeSet`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FutureQueue()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addEvent(SimEvent newEvent)` Add a new event to the queue.
    `void` | `addEventFirst(SimEvent newEvent)` Add a new event to the head of the queue.
    `void` | `clear()` Clears the queue.
    `Iterator<SimEvent>` | `iterator()` Returns an iterator to the queue.
    `boolean` | `remove(SimEvent event)` Removes the event from the queue.
    `boolean` | `removeAll(Collection<SimEvent> events)` Removes all the events from the queue.
    `int` | `size()` Returns the size of this event queue.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FutureQueue

          public FutureQueue()

  - ### Method Detail

    - #### addEvent

          public void addEvent(SimEvent newEvent)

      Add a new event to the queue. Adding a new event to the queue preserves the temporal order of the events in the queue.
      Parameters:
        `newEvent` - The event to be put in the queue.

    - #### addEventFirst

          public void addEventFirst(SimEvent newEvent)

      Add a new event to the head of the queue.
      Parameters:
        `newEvent` - The event to be put in the queue.

    - #### iterator

          public Iterator<SimEvent> iterator()

      Returns an iterator to the queue.
      Returns:
        the iterator

    - #### size

          public int size()

      Returns the size of this event queue.
      Returns:
        the size

    - #### remove

          public boolean remove(SimEvent event)

      Removes the event from the queue.
      Parameters:
        `event` - the event
      Returns:
        true, if successful

    - #### removeAll

          public boolean removeAll(Collection<SimEvent> events)

      Removes all the events from the queue.
      Parameters:
        `events` - the events
      Returns:
        true, if successful

    - #### clear

          public void clear()

      Clears the queue.

Copyright © 2013 The Cloud Computing and Distributed Systems (CLOUDS) Laboratory, The University of Melbourne. All Rights Reserved.