Package org.xwiki.rendering.block.match
Class CompositeBlockMatcher
- java.lang.Object
-
- org.xwiki.rendering.block.match.CompositeBlockMatcher
-
- All Implemented Interfaces:
BlockMatcher
public class CompositeBlockMatcher extends Object implements BlockMatcher
Implementation ofBlockMatcher
which matches blocks using passed matchers in series.- Since:
- 3.0M3
- Version:
- $Id: 9011a50c3e8015c6527d7899d29f3bcef91bdb5a $
-
-
Constructor Summary
Constructors Constructor Description CompositeBlockMatcher(List<BlockMatcher> matchers)
CompositeBlockMatcher(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
-
CompositeBlockMatcher
public CompositeBlockMatcher(List<BlockMatcher> matchers)
- Parameters:
matchers
- list of matchers to add
-
CompositeBlockMatcher
public CompositeBlockMatcher(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
-
-