jmdp.basic
Interface Events<E extends Event>

All Superinterfaces:
java.lang.Iterable<E>
All Known Implementing Classes:
EventsSet

public interface Events<E extends Event>
extends java.lang.Iterable<E>

This class represents a set of objects Event. The user must choose his own data structure and define the constuctors. For an easy way to declare and use a set of events see <\c>EventsCollection<\c>, which is an extension of Events.

Author:
Andres Sarmiento and German Riano - Universidad de Los Andes

Method Summary
 void add(E s)
          This method adds an object to the set of events.
 java.util.Iterator<E> iterator()
          This function must be implemented.
 int size()
          Returns the number of elements.
 

Method Detail

iterator

java.util.Iterator<E> iterator()
This function must be implemented. Must return an iterator over the events.

Specified by:
iterator in interface java.lang.Iterable<E extends Event>

add

void add(E s)
This method adds an object to the set of events.

Parameters:
s - object to be added.

size

int size()
Returns the number of elements.

Returns:
the number of Event elements.