public class EventMatcherSugar extends Object
EventMatcher elements.| Constructor and Description |
|---|
EventMatcherSugar() |
| Modifier and Type | Method and Description |
|---|---|
static <E extends MetaDataActionEvent<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 MetaDataEvent<?>> |
and(EventMatcher<E>... aEventMatchers)
Factory method to create an "AND" matcher for the given matchers.
|
static <E extends MetaDataEvent<?>> |
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 MetaDataEvent<?>> |
isAssignableFrom(Class<?> aEventType)
Factory method to create an event matcher by event type.
|
static <E extends MetaDataEvent<?>> |
nameEqualWith(String aName)
Factory method to create an "EQUAL WITH" matcher for the given name
compared with the name stored in the
EventMetaData. |
static <E extends MetaDataEvent<?>> |
or(EventMatcher<E>... aEventMatchers)
Factory method to create an "OR" matcher for the given matchers.
|
static <E extends MetaDataEvent<?>,PT> |
publisherIsAssignableFrom(Class<? extends PT> aPublisherType)
Factory method to create an event matcher by event publisher type.
|
static <E extends MetaDataEvent<?>> |
universalIdEqualWith(String aUniversalId)
Factory method to create an "EQUAL WITH" matcher for the given UID
compared with the UID stored in the
EventMetaData. |
public static <E extends MetaDataEvent<?>> 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 MetaDataEvent<?>,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 MetaDataEvent<?>> 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 MetaDataEvent<?>> 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 MetaDataEvent<?>> EventMatcher<E> nameEqualWith(String aName)
EventMetaData.E - The event type applied to the matcheraName - The name to be compared with a MetaDataEvent's
EventMetaData's name property.MetaDataEvent's
name property.public static <E extends MetaDataEvent<?>> EventMatcher<E> groupEqualWith(String aGroup)
EventMetaData.E - The event type applied to the matcheraGroup - The group to be compared with a MetaDataEvent's
EventMetaData's group property.MetaDataEvent's
group property.public static <E extends MetaDataEvent<?>> EventMatcher<E> universalIdEqualWith(String aUniversalId)
EventMetaData.E - The event type applied to the matcheraUniversalId - The UID to be compared with a MetaDataEvent's
EventMetaData's UID property.MetaDataEvent's UID
property.public static <E extends MetaDataActionEvent<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 MetaDataEvent's
EventMetaData's action property.ActionEvent's
action property.Copyright © 2018. All rights reserved.