Class OneEventCollection
java.lang.Object
com.espertech.esper.common.internal.collection.OneEventCollection
Simple collection that exposes a limited add-and-get interface and that is optimized towards holding
a single event, but can hold multiple events. If more then one event is added, the
class allocates a linked list for additional events.
-
Constructor Details
-
OneEventCollection
public OneEventCollection()
-
-
Method Details
-
add
Add an event to the collection.- Parameters:
theEvent
- is the event to add
-
isEmpty
public boolean isEmpty()Returns true if the collection is empty.- Returns:
- true if empty, false if not
-
toArray
Returns an array holding the collected events.- Returns:
- event array
-
add
-
getFirstEvent
-
getAdditionalEvents
-
clear
public void clear()
-