Class EventQualifiersMatcher
java.lang.Object
org.microbean.event.EventQualifiersMatcher
- All Implemented Interfaces:
BiPredicate<Collection<? extends NamedAttributeMap<?>>,
,Collection<? extends NamedAttributeMap<?>>> Matcher<Collection<? extends NamedAttributeMap<?>>,
Collection<? extends NamedAttributeMap<?>>>
public final class EventQualifiersMatcher
extends Object
implements Matcher<Collection<? extends NamedAttributeMap<?>>,Collection<? extends NamedAttributeMap<?>>>
A
Matcher
encapsulating CDI-compatible event
qualifier matching rules.- Author:
- Laird Nelson
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
test
(Collection<? extends NamedAttributeMap<?>> receiverAttributes, Collection<? extends NamedAttributeMap<?>> payloadAttributes) Returnstrue
if and only if either the qualifiers present inreceiverAttributes
are empty, or if the collection of qualifiers present inpayloadAttributes
contains all of the qualifiers present inreceiverAttributes
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiPredicate
and, negate, or
-
Constructor Details
-
EventQualifiersMatcher
public EventQualifiersMatcher()Creates a newEventQualifiersMatcher
.
-
-
Method Details
-
test
public final boolean test(Collection<? extends NamedAttributeMap<?>> receiverAttributes, Collection<? extends NamedAttributeMap<?>> payloadAttributes) Returnstrue
if and only if either the qualifiers present inreceiverAttributes
are empty, or if the collection of qualifiers present inpayloadAttributes
contains all of the qualifiers present inreceiverAttributes
.- Specified by:
test
in interfaceBiPredicate<Collection<? extends NamedAttributeMap<?>>,
Collection<? extends NamedAttributeMap<?>>> - Specified by:
test
in interfaceMatcher<Collection<? extends NamedAttributeMap<?>>,
Collection<? extends NamedAttributeMap<?>>> - Parameters:
receiverAttributes
- aCollection
ofNamedAttributeMap
s; must not benull
payloadAttributes
- aCollection
ofNamedAttributeMap
s; must not benull
- Returns:
true
if and only if either the qualifiers present inreceiverAttributes
are empty, or if the collection of qualifiers present inpayloadAttributes
contains all of the qualifiers present inreceiverAttributes
- Throws:
NullPointerException
- if either argument isnull
-