Package org.xwiki.rendering.block.match
Class CounterBlockMatcher
java.lang.Object
org.xwiki.rendering.block.match.CounterBlockMatcher
- All Implemented Interfaces:
BlockMatcher
Implementation of
BlockMatcher which match any Block with the provided class.- Since:
- 10.10RC1
- Version:
- $Id: 00e8c5819c658c08bb5a3604984468cc9b06b3d5 $
-
Constructor Summary
ConstructorsConstructorDescriptionCount all blocks.CounterBlockMatcher(Block stopBlock) Find the index of the passed block. -
Method Summary
-
Constructor Details
-
CounterBlockMatcher
public CounterBlockMatcher()Count all blocks. -
CounterBlockMatcher
Find the index of the passed block.- Parameters:
stopBlock- the block where to stop counting
-
-
Method Details
-
match
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
-
getCount
public long getCount()- Returns:
- the count
-