Class OrMatcherImpl<M>

  • Type Parameters:
    M - The matchee type
    All Implemented Interfaces:
    Matcher<M>


    public class OrMatcherImpl<M>
    extends java.lang.Object
    implements Matcher<M>
    A logical OR implementation of a Matcher encapsulating Matcher instances. The OR Matcher matches when any of the provided Matcher instances does match (OR).
    • Constructor Summary

      Constructors 
      Constructor Description
      OrMatcherImpl​(Matcher<M>... aMatchers)
      Constructs an OR Matcher, i.e. any of the provided Matcher instances need to match in order for the OR Matcher to match.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isMatching​(M aMatchee)
      Tests whether the given event is matching the mathcer's criteria.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OrMatcherImpl

        @SafeVarargs
        public OrMatcherImpl​(Matcher<M>... aMatchers)
        Constructs an OR Matcher, i.e. any of the provided Matcher instances need to match in order for the OR Matcher to match.
        Parameters:
        aMatchers - The Matcher instances to be combined with a logical OR.
    • Method Detail

      • isMatching

        public boolean isMatching​(M aMatchee)
        Tests whether the given event is matching the mathcer's criteria.
        Specified by:
        isMatching in interface Matcher<M>
        Parameters:
        aMatchee - The matchee used for testing matchability.
        Returns:
        True in case the matchee matches the matcher's criteria, else false.