public final class MatchedEventMapImpl extends Object implements MatchedEventMap
Constructor and Description |
---|
MatchedEventMapImpl(MatchedEventMapMeta meta)
Constructor creates an empty collection of events.
|
MatchedEventMapImpl(MatchedEventMapMeta meta,
Object[] matches) |
Modifier and Type | Method and Description |
---|---|
void |
add(int tag,
Object theEvent)
Add an event to the collection identified by the given tag.
|
EventBean |
getMatchingEvent(int tag)
Returns a single event instance given the tag identifier, or null if the tag could not be located.
|
Object |
getMatchingEventAsObject(int tag)
Returns the object for the matching event, be it the event bean array or the event bean.
|
Object |
getMatchingEventAsObjectByTag(String key) |
EventBean |
getMatchingEventByTag(String resultEventAsName) |
Object[] |
getMatchingEvents()
Returns a map containing the events where the key is the event tag string and the value is the event
instance.
|
Map<String,Object> |
getMatchingEventsAsMap() |
MatchedEventMapMeta |
getMeta() |
void |
merge(MatchedEventMap other)
Merge the state of an other match event structure into this one by adding all entries
within the MatchedEventMap to this match event.
|
MatchedEventMapImpl |
shallowCopy()
Make a shallow copy of this collection.
|
String |
toString() |
public MatchedEventMapImpl(MatchedEventMapMeta meta)
meta
- metadatapublic MatchedEventMapImpl(MatchedEventMapMeta meta, Object[] matches)
public void add(int tag, Object theEvent)
add
in interface MatchedEventMap
tag
- is an identifier to retrieve the event fromtheEvent
- is the event object or array of event object to be addedpublic Object[] getMatchingEvents()
getMatchingEvents
in interface MatchedEventMap
public EventBean getMatchingEvent(int tag)
getMatchingEvent
in interface MatchedEventMap
tag
- is the identifier to look forpublic Object getMatchingEventAsObject(int tag)
MatchedEventMap
getMatchingEventAsObject
in interface MatchedEventMap
tag
- is the tag to return the object forpublic MatchedEventMapImpl shallowCopy()
shallowCopy
in interface MatchedEventMap
public void merge(MatchedEventMap other)
merge
in interface MatchedEventMap
other
- is the other instance to merge in.public Map<String,Object> getMatchingEventsAsMap()
getMatchingEventsAsMap
in interface MatchedEventMap
public MatchedEventMapMeta getMeta()
getMeta
in interface MatchedEventMap
public EventBean getMatchingEventByTag(String resultEventAsName)
getMatchingEventByTag
in interface MatchedEventMap
public Object getMatchingEventAsObjectByTag(String key)
getMatchingEventAsObjectByTag
in interface MatchedEventMap