org.objectweb.fractal.adl
Class BasicTaskMap

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended byorg.objectweb.fractal.adl.BasicTaskMap
All Implemented Interfaces:
Cloneable, Map, Serializable, TaskMap

public class BasicTaskMap
extends HashMap
implements TaskMap

Basic implementation of the TaskMap interface.

See Also:
Serialized Form

Constructor Summary
BasicTaskMap()
           
 
Method Summary
 void addTask(String type, Object id, org.objectweb.deployment.scheduling.core.api.Task task)
          Adds the given task to this task map.
 org.objectweb.deployment.scheduling.core.api.Task getTask(String type, Object id)
          Returns the task of the given type and identifier.
 org.objectweb.deployment.scheduling.core.api.Task[] getTasks()
          Returns the tasks contained in this task map.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

BasicTaskMap

public BasicTaskMap()
Method Detail

getTasks

public org.objectweb.deployment.scheduling.core.api.Task[] getTasks()
Description copied from interface: TaskMap
Returns the tasks contained in this task map.

Specified by:
getTasks in interface TaskMap
Returns:
the tasks contained in this task map.

getTask

public org.objectweb.deployment.scheduling.core.api.Task getTask(String type,
                                                                 Object id)
                                                          throws NoSuchElementException
Description copied from interface: TaskMap
Returns the task of the given type and identifier.

Specified by:
getTask in interface TaskMap
Parameters:
type - the type of the task that must be returned.
id - the identifier of the task that must be returned.
Returns:
the task whose type and identifier are given.
Throws:
NoSuchElementException - if there is no such task.

addTask

public void addTask(String type,
                    Object id,
                    org.objectweb.deployment.scheduling.core.api.Task task)
Description copied from interface: TaskMap
Adds the given task to this task map.

Specified by:
addTask in interface TaskMap
Parameters:
type - the type of the task to be added.
id - the identifier of the task to be added.
task - the task itself.