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
`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.

### Fields inherited from class edu.isi.pegasus.planner.classes.Data

`mLogger, mLogMsg`

### Constructor Summary

Constructors
Constructor and Description
`Notifications()` The default constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `add(Invoke notification)` Adds a Invoke object correpsonding to a notification.
`private void` `addAll(Invoke.WHEN when, java.util.Collection<Invoke> invokes)` Convenience method at add all the notifications corresponding to a particular event
`void` `addAll(Notifications notifications)` Adds all the notifications passed to the underlying container.
`java.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 condition
`boolean` `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`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### 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.

### Constructor Detail

#### Notifications

    public Notifications()

The default constructor.

### 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 class `java.lang.Object`
Returns:
  the clone

#### toString

    public java.lang.String toString()

Returns a String description of the object

Specified by:
  `toString` in class `Data`
Returns:

#### 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 happen
  `notifications` - the list of notificiations