Class OrBlockMatcher

  • All Implemented Interfaces:
    BlockMatcher

    public class OrBlockMatcher
    extends Object
    implements BlockMatcher
    Implementation of BlockMatcher which matches blocks by matching with any of the configured matchers. This is different from CompositeBlockMatcher which does an AND.
    Since:
    4.3M2
    Version:
    $Id: d3ead87adea751c53f85cfcc92ce7c90017a4763 $
    • Constructor Detail

      • OrBlockMatcher

        public OrBlockMatcher​(List<BlockMatcher> matchers)
        Parameters:
        matchers - list of matchers to add
      • OrBlockMatcher

        public OrBlockMatcher​(BlockMatcher... matchers)
        Parameters:
        matchers - vararg list of matchers to add
    • Method Detail

      • match

        public boolean match​(Block block)
        Description copied from interface: BlockMatcher
        True if the provided block is matched.
        Specified by:
        match in interface BlockMatcher
        Parameters:
        block - the block to match
        Returns:
        true if the provided block is matched, false otherwise