SimJava 2.0.1

eduni.simjava
Class FutureEvqueue

Object
  extended by FutureEvqueue

 class FutureEvqueue
extends Object

This class implements the event queue used by Sim_system.

The event queue is separated into two subqueues, the future queue and the deferred queue. Newly arrived events are added to the future queue while events that the receiving entity is unable to process are placed in the deferred queue. The current implementation uses a TreeSet to store the events received.

This class is used internally by Sim_system and should not be directly accessed.

Version:
0.1, 25 June 1995
Author:
Ross McNab, Marcos Dias de Assuncao (Changed this class to use TreeSet)
See Also:
Sim_system

Constructor Summary
FutureEvqueue()
          Allocates a new Evqueue object.
 
Method Summary
 void add_event(Sim_event new_event)
          Add a new event to the queue.
 void clear()
          Clears the queue.
 Iterator<Sim_event> iterator()
          Returns an interator to the queue.
 int size()
          Returns the size of this event queue
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FutureEvqueue

public FutureEvqueue()
Allocates a new Evqueue object.

Method Detail

add_event

public void add_event(Sim_event new_event)
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:
new_event - The event to be put in the queue.

iterator

public Iterator<Sim_event> iterator()
Returns an interator to the queue.

Returns:
the iterator

size

public int size()
Returns the size of this event queue

Returns:
the size

clear

public void clear()
Clears the queue.


SimJava 2.0.1

The University of Edinburgh, 2009