Module org.refcodes.observer
Package org.refcodes.observer
Class PublisherIsAssignableFromMatcher<E extends GenericMetaDataEvent<?,?>,PT>
java.lang.Object
org.refcodes.observer.PublisherIsAssignableFromMatcher<E,PT>
- Type Parameters:
E- The matchee type.PT- The publisher type.
- All Implemented Interfaces:
org.refcodes.matcher.Matchable<E>,org.refcodes.matcher.Matcher<E>,org.refcodes.mixin.Schemable<org.refcodes.matcher.MatcherSchema>,EventMatcher<E>
public class PublisherIsAssignableFromMatcher<E extends GenericMetaDataEvent<?,?>,PT>
extends Object
implements EventMatcher<E>
Matches by event publisher type (EVENT PUBLISHER TYPE).
-
Constructor Summary
ConstructorsConstructorDescriptionPublisherIsAssignableFromMatcher(Class<? extends PT> aEventPublisherType) Instantiates a new publisher is assignable from matcher impl. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisMatching(E aEvent) Tests whether the givenGenericActionEventis matching theMatcher's criteria.org.refcodes.matcher.MatcherSchematoSchema()
-
Constructor Details
-
PublisherIsAssignableFromMatcher
Instantiates a new publisher is assignable from matcher impl.- Parameters:
aEventPublisherType- the event publisher type
-
-
Method Details
-
isMatching
Tests whether the givenGenericActionEventis matching theMatcher's criteria.- Specified by:
isMatchingin interfaceEventMatcher<E extends GenericMetaDataEvent<?,?>> - Specified by:
isMatchingin interfaceorg.refcodes.matcher.Matchable<E extends GenericMetaDataEvent<?,?>> - Parameters:
aEvent- TheGenericActionEventused for testing its matchability.- Returns:
- True in case the
GenericActionEventmatches theMatcher's criteria, else false.
-
toSchema
public org.refcodes.matcher.MatcherSchema toSchema()- Specified by:
toSchemain interfaceorg.refcodes.mixin.Schemable<E extends GenericMetaDataEvent<?,?>>
-