planet.simulate
Class Scheduler

java.lang.Object
  extended byplanet.simulate.Scheduler
All Implemented Interfaces:
IScheduler, java.io.Serializable

public class Scheduler
extends java.lang.Object
implements IScheduler, java.io.Serializable

Author:
Jordi Pujol 14-jul-2005
See Also:
Serialized Form

Constructor Summary
Scheduler()
          Initializes this Scheduler.
 
Method Summary
 void addEvents(java.util.Vector events)
          Adds all the Event instances within events into the current scheduler.
 java.util.Vector getEvents(int time)
          Gets all alerts occurred at time time.
 boolean hasNext()
          Shows if there are more alerts.
 java.lang.String toString()
          Shows the string representation of the current scheduler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Scheduler

public Scheduler()
Initializes this Scheduler.

Method Detail

addEvents

public void addEvents(java.util.Vector events)
Adds all the Event instances within events into the current scheduler.

Specified by:
addEvents in interface IScheduler
Parameters:
events - Unordered list of events.
See Also:
IScheduler.addEvents(java.util.Vector)

getEvents

public java.util.Vector getEvents(int time)
Gets all alerts occurred at time time.

Specified by:
getEvents in interface IScheduler
Parameters:
time - Number of step which obtain all its alerts.
Returns:
All alerts occurred at time time.
See Also:
IScheduler.getEvents(int)

hasNext

public boolean hasNext()
Shows if there are more alerts.

Specified by:
hasNext in interface IScheduler
Returns:
true if there are more alerts.
See Also:
IScheduler.hasNext()

toString

public java.lang.String toString()
Shows the string representation of the current scheduler.

Returns:
The string representation of the current scheduler.
See Also:
Object.toString()