scheduler.modules
Class ConnectionsFinderTasksManager

java.lang.Object
  extended byscheduler.modules.ConnectionsFinderTasksManager
All Implemented Interfaces:
ConnectionsFinderTasksManager

public final class ConnectionsFinderTasksManager
extends java.lang.Object
implements ConnectionsFinderTasksManager

A manager used to store the tasks for the process of finding connections for the single travel part.

Author:
Piotrek

Field Summary
private  java.util.Stack stack
          A stack used to store the tasks.
 
Constructor Summary
ConnectionsFinderTasksManager()
          Constructor.
 
Method Summary
 void AddTask(ConnectionsFinderTask task)
          Adds a task to the manager to be stored for a later execution.
 void Clear()
          Removes all the tasks from the manager.
 ConnectionsFinderTask GetTask()
          Gets a task to be performed.
 int GetTasksCount()
          Gets a number of tasks stored in the manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stack

private java.util.Stack stack
A stack used to store the tasks.

Constructor Detail

ConnectionsFinderTasksManager

public ConnectionsFinderTasksManager()
Constructor.

Method Detail

AddTask

public void AddTask(ConnectionsFinderTask task)
Description copied from interface: ConnectionsFinderTasksManager
Adds a task to the manager to be stored for a later execution. It does not check if a given task has been already added in the past.

Specified by:
AddTask in interface ConnectionsFinderTasksManager
Parameters:
task - A task to the manager to be stored for a later execution.
See Also:
ConnectionsFinderTasksManager.AddTask(ConnectionsFinderTask)

GetTask

public ConnectionsFinderTask GetTask()
Description copied from interface: ConnectionsFinderTasksManager
Gets a task to be performed.

Specified by:
GetTask in interface ConnectionsFinderTasksManager
Returns:
A task to be performed or null if there are no more.
See Also:
ConnectionsFinderTasksManager.GetTask()

Clear

public void Clear()
Description copied from interface: ConnectionsFinderTasksManager
Removes all the tasks from the manager.

Specified by:
Clear in interface ConnectionsFinderTasksManager
See Also:
ConnectionsFinderTasksManager.Clear()

GetTasksCount

public int GetTasksCount()
Gets a number of tasks stored in the manager.

Returns:
A number of tasks stored in the manager.