E
- The type of Events in this set.public class EventsSet<E extends Event> extends java.lang.Object implements Events<E>
Constructor and Description |
---|
EventsSet()
Creates an empty set of Events;
|
EventsSet(E[] eventArray)
Creates an empty set of Events;
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e)
Adds the Event e to the set.
|
boolean |
contains(Event e)
Returns true if the set contains this Event.
|
java.util.Iterator<E> |
iterator()
This method returns a safe way to walk through the events in a
particular set.
|
int |
size()
Returns the number of elements.
|
E[] |
toEventArray()
Returns an array with the Events in the set.
|
java.lang.String |
toString() |
public EventsSet()
public EventsSet(E[] eventArray)
eventArray
- an array representation of the set.public final java.util.Iterator<E> iterator()
public boolean add(E e)
public boolean contains(Event e)
e
- The event.public E[] toEventArray()
public java.lang.String toString()
toString
in class java.lang.Object