Lightweight Bartering Grid

lbg.simulator.event
Class EventList

java.lang.Object
  extended by lbg.simulator.event.EventList

public class EventList
extends java.lang.Object

current_time = timestamp of Events last extracted from the EventList

Author:
Cyril Briquet

Constructor Summary
EventList(Scenario sc)
           
 
Method Summary
 void addEvent(Event evt)
           
 boolean containsEvent(Event evt)
           
 EventContainer extractFirstEvent()
          side effect: time is updated to the timestamp of the extracted Event
 EventFactory factory()
           
 boolean isEmpty()
          Returns true if EventList is empty, i.e.
 void removeEvent(Event evt)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EventList

public EventList(Scenario sc)
          throws GridException
Throws:
GridException
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

factory

public EventFactory factory()

isEmpty

public boolean isEmpty()
Returns true if EventList is empty, i.e. contains no Event.

Returns:
true if Event List is empty

addEvent

public void addEvent(Event evt)
              throws GridException
Throws:
GridException

extractFirstEvent

public EventContainer extractFirstEvent()
                                 throws GridException
side effect: time is updated to the timestamp of the extracted Event

Throws:
GridException

removeEvent

public void removeEvent(Event evt)
                 throws GridException
Throws:
GridException

containsEvent

public boolean containsEvent(Event evt)
                      throws GridException
Throws:
GridException

Lightweight Bartering Grid

Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.