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 ofBlockMatcher
which matches blocks by matching with any of the configured matchers. This is different fromCompositeBlockMatcher
which 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 boolean
match(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:BlockMatcher
True if the provided block is matched.- Specified by:
match
in interfaceBlockMatcher
- Parameters:
block
- the block to match- Returns:
- true if the provided block is matched, false otherwise
-
-