Package edu.isi.pegasus.planner.classes
Class Notifications
- java.lang.Object
-
- edu.isi.pegasus.planner.classes.Data
-
- edu.isi.pegasus.planner.classes.Notifications
-
- All Implemented Interfaces:
java.lang.Cloneable
public class Notifications extends Data
A container class that stores all the notifications that need to be done indexed by the various conditions.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.EnumMap<Invoke.WHEN,java.util.List<Invoke>>
mInvokeMap
An enum map that associates the various notification events with the list of actions that need to be taken.
-
Constructor Summary
Constructors Constructor Description Notifications()
The default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Invoke notification)
Adds a Invoke object correpsonding to a notification.void
addAll(Notifications notifications)
Adds all the notifications passed to the underlying container.private void
addAll(Invoke.WHEN when, java.util.Collection<Invoke> invokes)
Convenience method at add all the notifications corresponding to a particular eventjava.lang.Object
clone()
Returns the clone of the object.java.util.Collection<Invoke>
getNotifications(Invoke.WHEN when)
Returns a collection of all the notifications that need to be done for a particular conditionboolean
isEmpty()
Returns a boolean indicating whether the notifications object is empty or not.void
reset()
Resets the internal invoke map.java.lang.String
toString()
Returns a String description of the object-
Methods inherited from class edu.isi.pegasus.planner.classes.Data
setToString, vectorToString
-
-
-
-
Field Detail
-
mInvokeMap
private java.util.EnumMap<Invoke.WHEN,java.util.List<Invoke>> mInvokeMap
An enum map that associates the various notification events with the list of actions that need to be taken.
-
-
Method Detail
-
reset
public void reset()
Resets the internal invoke map.
-
add
public void add(Invoke notification)
Adds a Invoke object correpsonding to a notification.- Parameters:
notification
- the notification object
-
addAll
public void addAll(Notifications notifications)
Adds all the notifications passed to the underlying container.- Parameters:
notifications
- the notification object
-
getNotifications
public java.util.Collection<Invoke> getNotifications(Invoke.WHEN when)
Returns a collection of all the notifications that need to be done for a particular condition- Parameters:
when
- the condition- Returns:
-
isEmpty
public boolean isEmpty()
Returns a boolean indicating whether the notifications object is empty or not.- Returns:
- true if empty else false
-
clone
public java.lang.Object clone()
Returns the clone of the object.- Overrides:
clone
in classjava.lang.Object
- Returns:
- the clone
-
toString
public java.lang.String toString()
Returns a String description of the object
-
addAll
private void addAll(Invoke.WHEN when, java.util.Collection<Invoke> invokes)
Convenience method at add all the notifications corresponding to a particular event- Parameters:
when
- when does the event happennotifications
- the list of notificiations
-
-