|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmdp.basic.EventsSet<E>
public class EventsSet<E extends Event>
This class represents a set of events of type E. It uses java.Util.Collections to organize the elements.
Collection
Constructor Summary | |
---|---|
EventsSet()
Creates an empty set of objects E. |
|
EventsSet(E ev)
Creates a set of events with only one Event in it. |
|
EventsSet(E[] ev)
Creates a set of events from a given array of Event. |
|
EventsSet(java.lang.Iterable<E> evIter)
Creates a set of objects E from a given set that implements Iterable. |
Method Summary | |
---|---|
void |
add(E e)
Adds an event to the set. |
java.util.Iterator<E> |
iterator()
This method returns a safe way to walk through the events in a particular set. |
void |
remove(E e)
Removes an object from the set. |
int |
size()
Returns the number of elements. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventsSet()
public EventsSet(java.lang.Iterable<E> evIter)
evIter
- An iterator over events.public EventsSet(E ev)
ev
- an event of type Event.public EventsSet(E[] ev)
ev
- array of events o of type Event.Method Detail |
---|
public final java.util.Iterator<E> iterator()
iterator
in interface java.lang.Iterable<E extends Event>
iterator
in interface Events<E extends Event>
public void add(E e)
add
in interface Events<E extends Event>
e
- event to be added.public void remove(E e)
public int size()
Events
size
in interface Events<E extends Event>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |