org.xwiki.rendering.block.match
Class OrBlockMatcher

java.lang.Object
  extended by org.xwiki.rendering.block.match.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 Summary
OrBlockMatcher(BlockMatcher... matchers)
           
OrBlockMatcher(List<BlockMatcher> matchers)
           
 
Method Summary
 boolean match(Block block)
          True if the provided block is matched.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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


Copyright © 2004–2013 XWiki. All rights reserved.