|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmarkov.basic.EventsSet<E>
E
- The type of Events in this set.public class EventsSet<E extends Event>
This class represent a set of Events. The set should be build at the beggining and should not be changed in any way afterwards.
Constructor Summary | |
---|---|
EventsSet()
Creates an empty set of Events; |
|
EventsSet(E[] eventArray)
Creates an empty set of Events; |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EventsSet()
public EventsSet(E[] eventArray)
eventArray
- an array representation of the set.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 boolean add(E e)
add
in interface Events<E extends Event>
e
- The event to be added.
public boolean contains(Event e)
e
- The event.
public E[] toEventArray()
public java.lang.String toString()
toString
in class java.lang.Object
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 |