Package org.xwiki.rendering.block.match
Class OrBlockMatcher
- java.lang.Object
-
- org.xwiki.rendering.block.match.OrBlockMatcher
-
- All Implemented Interfaces:
BlockMatcher
public class OrBlockMatcher extends Object implements BlockMatcher
Implementation ofBlockMatcherwhich matches blocks by matching with any of the configured matchers. This is different fromCompositeBlockMatcherwhich does anAND.- Since:
- 4.3M2
- Version:
- $Id: d3ead87adea751c53f85cfcc92ce7c90017a4763 $
-
-
Constructor Summary
Constructors Constructor Description OrBlockMatcher(List<BlockMatcher> matchers)OrBlockMatcher(BlockMatcher... matchers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanmatch(Block block)True if the provided block is matched.
-
-
-
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:BlockMatcherTrue if the provided block is matched.- Specified by:
matchin interfaceBlockMatcher- Parameters:
block- the block to match- Returns:
- true if the provided block is matched, false otherwise
-
-