public class EventMatcherSugar extends Object
EventMatcher
elements.Constructor | Description |
---|---|
EventMatcherSugar() |
Modifier and Type | Method | Description |
---|---|---|
static <E extends GenericActionMetaDataEvent<A,?,?>,A> |
actionEqualWith(A aAction) |
Factory method to create an "EQUAL WITH" matcher for the given action
compared with the action stored in the
EventMetaData . |
static <E extends GenericMetaDataEvent<?,?>> |
and(EventMatcher<E>... aEventMatchers) |
Factory method to create an "AND" matcher for the given matchers.
|
static <E extends GenericMetaDataEvent<?,?>> |
catchAll() |
Catches all events, no matching is done.
|
static <E extends GenericMetaDataEvent<?,?>> |
catchNone() |
Catches no event, no matching is done.
|
static <E extends GenericMetaDataEvent<?,?>> |
groupEqualWith(String aGroup) |
Factory method to create an "EQUAL WITH" matcher for the given group
compared with the group stored in the
EventMetaData . |
static <E extends GenericMetaDataEvent<?,?>> |
isAssignableFrom(Class<?> aEventType) |
Factory method to create an event matcher by event type.
|
static <E extends GenericMetaDataEvent<?,?>> |
nameEqualWith(String aAlias) |
Factory method to create an "EQUAL WITH" matcher for the given name
compared with the name stored in the
EventMetaData . |
static <E extends GenericMetaDataEvent<?,?>> |
or(EventMatcher<E>... aEventMatchers) |
Factory method to create an "OR" matcher for the given matchers.
|
static <E extends GenericMetaDataEvent<?,?>,PT> |
publisherIsAssignableFrom(Class<? extends PT> aPublisherType) |
Factory method to create an event matcher by event publisher type.
|
static <E extends GenericMetaDataEvent<?,?>> |
universalIdEqualWith(String aUid) |
Factory method to create an "EQUAL WITH" matcher for the given UID
compared with the UID stored in the
EventMetaData . |
public static <E extends GenericMetaDataEvent<?,?>> EventMatcher<E> catchAll()
E
- The type of the event to be matchedEventMatcher
.public static <E extends GenericMetaDataEvent<?,?>> EventMatcher<E> catchNone()
E
- The type of the event to be matchedEventMatcher
.public static <E extends GenericMetaDataEvent<?,?>> EventMatcher<E> isAssignableFrom(Class<?> aEventType)
E
- The type of the event to be matchedaEventType
- The event type to be matched by this matcher.public static <E extends GenericMetaDataEvent<?,?>,PT> EventMatcher<E> publisherIsAssignableFrom(Class<? extends PT> aPublisherType)
E
- The type of the event to be matchedPT
- The publisher descriptor typeaPublisherType
- The event publisher type to be matched by this
matcher.@SafeVarargs public static <E extends GenericMetaDataEvent<?,?>> EventMatcher<E> or(EventMatcher<E>... aEventMatchers)
E
- The event type applied to the matcheraEventMatchers
- The matchers to be combined by an "OR".@SafeVarargs public static <E extends GenericMetaDataEvent<?,?>> EventMatcher<E> and(EventMatcher<E>... aEventMatchers)
E
- The event type applied to the matcheraEventMatchers
- The matchers to be combined by an "AND".public static <E extends GenericMetaDataEvent<?,?>> EventMatcher<E> nameEqualWith(String aAlias)
EventMetaData
.E
- The event type applied to the matcheraAlias
- The alias to be compared with a
GenericMetaDataEvent
's EventMetaData
's name
property.GenericMetaDataEvent
's name property.public static <E extends GenericMetaDataEvent<?,?>> EventMatcher<E> groupEqualWith(String aGroup)
EventMetaData
.E
- The event type applied to the matcheraGroup
- The group to be compared with a
GenericMetaDataEvent
's EventMetaData
's group
property.GenericMetaDataEvent
's group property.public static <E extends GenericMetaDataEvent<?,?>> EventMatcher<E> universalIdEqualWith(String aUid)
EventMetaData
.E
- The event type applied to the matcheraUid
- The UID to be compared with a GenericMetaDataEvent
's
EventMetaData
's UID property.GenericMetaDataEvent
's UID property.public static <E extends GenericActionMetaDataEvent<A,?,?>,A> EventMatcher<E> actionEqualWith(A aAction)
EventMetaData
.E
- The event type applied to the matcher.A
- The type of the action stored in the event. CAUTION: The
drawback of not using generic generic type declaration on a class
level is no granted type safety, the advantage is the ease of use:
Sub-classes can be used out of the box.aAction
- The action to be compared with a
GenericMetaDataEvent
's EventMetaData
's action
property.GenericActionEvent
's action property.Copyright © 2018. All rights reserved.